searching & tagged content on index page
13 posts by 4 authors in: Forums > CMS Builder
Last Post: September 19, 2008 (RSS)
By kapelle - September 5, 2008
news
articles on music
articles on websites
articles on songwriting
articles on sound equipment
website links
tutorials
1. Is it possible to do a search on the entire website and display the results, or can you only search one section editor at a time?
2. Each section will have several articles, with new content added each week. Let's say I put a new article in each section on a Monday. Is it possible to tag all the articles by date, then have only the articles from every section tagged by the same date (Monday) appear on the index page, like in a "what's new" section?
Re: [kapelle] searching & tagged content on index page
By Jake - September 8, 2008
Thanks for posting!
Let me address your questions one at a time:
1. Is it possible to do a search on the entire website and display the results, or can you only search one section editor at a time?
You can do either type of search - it's up to you! To set up a search page that accesses multiple sections, you'll want to download the multiSearch.php file in this forum post:
http://www.interactivetools.com/iforum/gforum.cgi?post=61466;search_string=multisearch;t=search_engine#61466
For instructions on setting up a regular search for a single section, you can visit this page of the documentation:
http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html
2. Each section will have several articles, with new content added each week. Let's say I put a new article in each section on a Monday. Is it possible to tag all the articles by date, then have only the articles from every section tagged by the same date (Monday) appear on the index page, like in a "what's new" section?
For this, were you looking to always show the latest article from each section, or were you looking to always show the most recent articles, regardless of the section they were added to?
Cheers,
Jake Marvin - Product Specialist
support@interactivetools.com
Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
Re: [Jake] searching & tagged content on index page
By kapelle - September 8, 2008 - edited: September 8, 2008
I know there's the feature to show only the last few articles, or the latest articles, but I don't want that. I'll have a date field and want to be able to say "I only want the article's title and summary from Sept. 9, from anywhere on the website, to show up on the index page" and there would be a link to the article wherever it is on the website.
Re: [kapelle] searching & tagged content on index page
Mickey
Re: [Michael Blake] searching & tagged content on index page
By kapelle - September 8, 2008
I would leave the same code in the index page, but just change "september 2" to the next week's date, pulling new articles into my "what's new" section.
The only problem is I know nothing of coding so could somebody show me what to put and where to put it - I'm great at cut and paste [:)]
Re: [kapelle] searching & tagged content on index page
By Dave - September 8, 2008
What you'd need to do (and would probably be a better way to organize things anyway) would be to have all your articles in one section with a pulldown for "category". Then you'd have a where like this:
where => " category = 'music' AND DATE_FORMAT(yourDateField, '%Y-%m-%d') = '2008-09-08' ",
It's a bit advanced, and need that mysql code above, but it should work.
Hope that helps!
interactivetools.com
Re: [Dave] searching & tagged content on index page
By kapelle - September 8, 2008 - edited: September 8, 2008
So, instead of having separate section editors for the different subjects like I normally do, I'll have all the different subjects in ONE section editor as separate categories? With different articles under these separate categories?
If that's the case, what code would I use to put separate categories on separate pages? - instead of Admin > Code Generator > select section as I normally put each section editor on a different page, how do I now put the different categories on separate pages?
If this is the only way to do it, no problem. But for me it would be easier to do it the regular way of separate section editors (it would be easier I think to keep track of all the content instead of having all the items listed under one category)
To make sure I understand, there's no way to pull all the articles with the same date from all the section editors in the database and put them on the index page in a "what's new" section? I'll have to go the route of putting them all in one category section editor?
Re: [kapelle] searching & tagged content on index page
By Dave - September 9, 2008
Just enter your category name like this:
category = 'music'
Another way to do the same thing is just add it to the code like this:
where => " category = 'music' ",
And to confirm, no, there's no easy way to pull articles from multiple sections and then filter them by date. There's ways to do it, but they involve pretty complex SQL.
Hope that helps, let me know if you need more help with that.
interactivetools.com
Re: [Dave] searching & tagged content on index page
<?php
require_once "/home/content/h/e/a/hearts2god/html/cmsAdmin/lib/viewer_functions.php";
list($resourcesRecords, $resourcesMetaData) = getRecords(array(
'tableName' => 'resources',
where => " category = 'music' AND DATE_FORMAT(date, '%Y-%m-%d') = '2008-09-16' ",
so, I don't want articles dated the 16th from JUST music, I want all the articles in the tableName resources. How would I write that?
Re: [kapelle] searching & tagged content on index page
By Dave - September 18, 2008
where => " DATE_FORMAT(date, '%Y-%m-%d') = '2008-09-16' ",
We're just removing the category = 'music' part. Would that work for you?
interactivetools.com