Fliter By Category

Post your suggestions for the script here.

Fliter By Category

Postby typeman » Thu Jan 07, 2010 5:22 pm

Hey all.

After searching the forums for a while, i couldn't find a topic which would allow the user to click a link and then the main contents of the page would then filter by category.

So for example, when the user clicks on the link "games", only the news post filed under the category "games" will appear.

Sorry if I'm missing the obvious, but it would be great if someone could help :)
typeman
 
Posts: 102
Joined: Sat Oct 17, 2009 7:38 am

Postby DarkSlim » Fri Jan 08, 2010 1:29 pm

Hmm I don't use it but it might help you, it's on the readme:

<?=cn_category(); ?>

Or with the proper variables like this:

<?=cn_category('variable1', 'variable2'); ?>


Also, you can just make a page like games.php for the Games category
in it you will include only your games category, that's it :)
or you can use the search for this one too
User avatar
DarkSlim
 
Posts: 298
Joined: Thu Aug 06, 2009 4:18 pm
Location: IL

Postby Torstein » Fri Jan 08, 2010 2:09 pm

You can also make links in this form: <a href="http://yourpage.com/index.php/category/parent/sub">something</a>, which would link to the news items in the category sub, which is a subcategory under the category parent.
Torstein
 
Posts: 292
Joined: Thu Aug 03, 2006 11:19 pm

Postby typeman » Fri Jan 08, 2010 7:42 pm

Thanks for both of your replies. :)

I did notice it in the readme this morning and decided to use that :) Thanks again for your help XD
typeman
 
Posts: 102
Joined: Sat Oct 17, 2009 7:38 am


Return to Suggestions



Who is online

Users browsing this forum: No registered users and 0 guests

cron