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: [Dave] Create a Master Featured News Items List

By Mohaukla - January 31, 2008

I have multiple news lists(categories), each with their own news items.
I want to be able to pull out the ones that are marked from each list and create a title and summary display list that will serve as a site wide master list of "Featured" items that will link back to the appropriate news list (category) when clicked.
So when the client is adding a new news item in any particular list and would like it to appear in the master list they would only need to check the "featured" check box or "isFeaturedArticle" check box or whatever name I give it. Much like the Listing Manager's "Featured" option.
I just thought that the featured check box was already in place and was not being used so it might make sense to utilize that field.
That is what I would like to achieve. Hope that makes more sense.
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 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!"