Hi,
I want to create a simple form to display channel items listed in two or more categories. I have two select menus with categories, I have the following search query in my template which, of course, returns all results in all categories:
{exp:query sql="SELECT distinct(cat_id) FROM exp_category_posts LEFT JOIN exp_channel_data ON exp_category_posts.entry_id = exp_channel_data.entry_id LEFT JOIN exp_channels ON exp_channel_data.channel_id = exp_channels.channel_id WHERE exp_channels.channel_name = 'timeline' GROUP BY exp_category_posts.entry_id " backspace="1""}
{exp:channel:entries channel="timeline" status="open" category_group="1"}So how does this work using variables to filter the results when the form returns the URL from the select as /mypage/C7 or /mypage/mycat ?
I want to add the code - e.g. catid = 7 - like PHP but I can’t work out how without the query string. ???
Any help appreciated. Thanks.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.