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 Only show specific story using DIV show/hide
Gallion311
Posted on 10 Mar 2011, 17:42:00

Access: Member
Total Posts: 8
Joined: 2010-04-06

Hey Chris, I'm trying to figure something out and it feels like it should be easy but I'm not having any luck.

So basically I have 3 tabs that use a classic javascript DIV Show/Hide to switch between them. Since I'm not switching with URL's I can just use a index.php?id=x solution.

I feel like what I need is an ID variable that I can call right in the php include; like:
Code:
<?php
$id 
= '21'; 
include 
'news/index.php';
?>


Again, I felt like this would be pretty easy but couldn't get it working...any ideas?

Thanks for your time,
Ryan
#3337
Chris
Posted on 10 Mar 2011, 17:47:52

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

Not ideal but it achieves the same results. Create a new category for each of the tabs, tab1/tab2/tab3 or whatever. Then assign each post to an individual category and use the $cat[] array to show only that article

Code:
<?php
$cat
[] = "tab1";
include 
'news/index.php';
?>
#3338
Network-13.com © 2013