Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2012, 10:15:39 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155401 Posts in 21698 Topics by 7729 Members
Latest Member: adnan
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: News item groupings - help please!  (Read 573 times)
gilly

Offline Offline

Posts: 49


« on: July 04, 2008, 05:28:26 AM »

The following is what I want to achieve, but not sure if its possible:

I have a site that has a bunch of news items on one page, and I have news items on another page which acts as an archive.

I have setup 2 groups - Current and Archive.

When I create a new news item, I assign it to the 'Current' group. It is then displayed on current-news.php. Now after a couple of weeks I would like to put this news post in the archive. I want to be able to simply modify the group it belongs to, say switch it from 'Current' to 'Archive' group. Once this is done, the news post should be visible in archive-news.php, and no longer in the current news page.

So, is this possible and how simple is it?

Thanks
Logged
marathoner

Offline Offline

Posts: 495


« Reply #1 on: July 04, 2008, 03:48:37 PM »

There are probably many ways to do something like this. Neither of these will actually change the group from current to archive...they simply display newer items on the current page and older items in the archive page.

One approach that I have used is to use AnyNews and display only the 5 most recent (or however many you want) on the first page and then all other news on the archive page.

Another approach is to use AnyNews to display items posted within the last 10 days (or however many you want) and all others on the archive page.

Keep in mind that you'll need to tweak the query in AnyNews to get results that you want.
Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2854



WWW
« Reply #2 on: July 04, 2008, 10:26:57 PM »

I think you mean this

1 page wich gives only the newsitems belonging to the group - current
and enother page wich shows only the archived news items

If this is so,
calling the page with ?g=1 gives obly group 1, ?g=2 gives only group 2
Allso you can use the anynews snippet to show posts from 1 group only.
So make a newspage, set it hidden so noone can see it
Make a new page - type CODE!! and use the anynewssnippet to show the current group only
Make another page with the anynewssnippet to show the archive .

Have fun,
John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
gilly

Offline Offline

Posts: 49


« Reply #3 on: July 06, 2008, 10:50:02 AM »

Thanks John and marathoner...will have a play around with this tomorrow and will let you know how I go.

Logged
gilly

Offline Offline

Posts: 49


« Reply #4 on: July 07, 2008, 02:11:38 AM »

This turned out very easy in the end!

I just added in code blocks wherever I wanted  a particular group of news items, and entered the group ID. The only problem is that when a news item has a long text area, and the user clicks on this, it takes them to the actual news item (and anynews is no longer used). The problem with this is that it gives the user links to click on to go back, but this goes back to a regular news listing.

This isnt a major issue though, it just means I need to customise the news module. So once I have customised both modules to my liking, I can at least re-use these modified modules.
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!