Hi.
My client wants to have a list of keywords - for example "apple", "orange", "pear"
They want these words to be links that when clicked will search for matching results.
For example click on 'apple' will return a list of recipes that contain "apple"
Is this possible?
If so, can someone give me an example of the script/code required to implement this.
If not... any ideas short of writing my own cms would be appreciated.
TIA
Heff.
Creating a link to search for a keyword - is it possible?
Re: Creating a link to search for a keyword - is it possible?
will this (the list of word-links) be a hard-coded list, or a dynamic list?
Re: Creating a link to search for a keyword - is it possible?
hard-coded links from a chart.
I have implemented a fix using copy/paste from a search, but I am sure there must be a better way.
I have implemented a fix using copy/paste from a search, but I am sure there must be a better way.
Re: Creating a link to search for a keyword - is it possible?
This is a basic example with only 3 words.
{assign var=search_phrases value=','|explode:'home,two,three'}
{foreach from=$search_phrases item='phrase'}
{cms_selflink page=$page_alias text=$phrase urlparam='&mact=Search,cntnt01,dosearch,0&submit=submit&cntnt01searchinput='|cat:$phrase}
{/foreach}
-
- Forum Members
- Posts: 248
- Joined: Sun Oct 28, 2007 4:14 am
Re: Creating a link to search for a keyword - is it possible
Peciura, that is a very cool scrap of code. Thanks!