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
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?
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
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.
interactivetools.com
Re: [Dave] Create a Master Featured News Items List
By Mohaukla - January 31, 2008
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.
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 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.
interactivetools.com
Re: [Dave] Create a Master Featured News Items List
By Mohaukla - February 6, 2008
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.
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
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!
interactivetools.com