Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support display just one category?
Wackyracer8
Posted on 22 Feb 2010, 22:52:30

Access: Member
Total Posts: 8
Joined: 2010-02-22

You can create different categories with this great program but what I want to do is have a different page for each category, so for example when I tag a post as news it goes to the news page, if i tag a post with opportunities then the post goes to the opportunities page etc.

Is this possible? and if so how would I do it?

Thanks a lot, and a great application that has been built.
#1941
Chris
Posted on 22 Feb 2010, 22:57:28

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Once you have assigned your news articles to different categories. You then define which categories you want to display when adding the code to your site. For example

Code:
<?php
$cat
[] = "Cat1";
include 
'news/index.php';
?>


This could would display only news articles that have been assigned to the category "Cat1".

In order to have the different pages setup like you mentioned you could create a few hyperlinks something like this

Code:
<a href="?cat=Cat1">Cat1 page</a>
<a href="?cat=Cat2">Cat2 page</a>
<a href="?cat=Cat3">Cat3 page</a>


Then use this code for displaying the news articles

Code:
<?php
$cat
[] = $_GET['cat'];
include 
'news/index.php';
?>
#1942
Last edited by Chris at 2010-02-22 22:57:42 Reason:
Wackyracer8
Posted on 23 Feb 2010, 16:00:41

Access: Member
Total Posts: 8
Joined: 2010-02-22

Thanks Chris, that worked a treat, great work. Thanks again!
#1949
Network-13.com © 2013