Create a Master Featured News Items List

6 posts by 2 authors in: Forums > CMS Builder
Last Post: February 6, 2008   (RSS)

By Mohaukla - January 30, 2008 - edited: January 30, 2008

I am not using the Featured check box for moving the item to the top of the page as I am using another field to sort the order anyway. What I would like to do is use that checkbox to create a new list of news items that are from different news lists and have them appear with just the title and summary content showing and allow them to link to the appropriate news list when clicked.
Could the feature checkbox be used for something like this and if so can you show me the code to achieve this master feature list?
Michael Moyers



Owner of Just Rite Design Inc. A growing network of professionals in web design, graphic design, flash development, programming, and audio & video productions.



"Due to budget constraints, the Light at the end of the tunnel will be temporarily out!"

Re: [justritedesign] Create a Master Featured News Items List

By Dave - January 30, 2008

Hi Michael,

If I understand right you want to be able to list just the articles with a checkbox checked? Is that right? If so, you can do it by creating a new list viewer and adding a MySql WHERE clause that returns only those articles.

Say your field was called "isFeaturedArticle" you could add this to your list viewer options:

$options['where'] = 'isFeaturedArticle = 1';

Does that make sense? Hope that helps! Let me know if I can be more clear on that or if I misunderstood your question.
Dave Edis - Senior Developer
interactivetools.com

Re: [justritedesign] Create a Master Featured News Items List

By Dave - January 31, 2008

If I understand correctly... There's no automatic way to load records from multiple sections and display them together. Part of the problem is that different section might have different fields.

If your sections had the same fields then one way to do it would be to merge your sections and have checkboxes and other fields to indicate what kind of content a record was (rather than having it in a separate section.

If you really wanted to merge records from multiple sections the way to do it would be with multiple calls to getListRows (list viewers) and then to merge and sort all those values with PHP and output them again.

Hope that helps. Let me know what you want to do.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Create a Master Featured News Items List

By Mohaukla - February 6, 2008

Ok then lets look at the possibility of pulling just the title field info from selected lists and of those which had the check mark on a featured field.

Could we pull just that information and list them in a separate list (made up of multiple GetListRows) and inside above the closing foreach tag create a link to the appropriate list page in the site? (That part would most likely be linked manually).

So that way the titles didn't have to exactly have the linking ability but could list out the titles and then say "For more (category) news click here"

Sorry If thats a bit to chew on but it would be great to figure a way to do this. But I will wait to see what you think.
Michael Moyers



Owner of Just Rite Design Inc. A growing network of professionals in web design, graphic design, flash development, programming, and audio & video productions.



"Due to budget constraints, the Light at the end of the tunnel will be temporarily out!"

Re: [justritedesign] Create a Master Featured News Items List

By Dave - February 6, 2008

Yep, that seems possible. How do you want them ordered? One list after another or all in one big list?

The next step would be to create a html mockup of how you want it to look. That lets you sort out any of design issues without getting bogged down in code. After that dropping in the viewer code is usually pretty quick.

Let me know when you get that far (post a link if you can) and I can help you figure out the viewer code part.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com