TinyPortal

Development => Support => Topic started by: lebisol on November 19, 2007, 11:26:26 PM

Title: How to detect current page/article in URL
Post by: lebisol on November 19, 2007, 11:26:26 PM
Hello there,
I am trying to create a condition in order to detect on which page/article user is currently reading. Goal is then to use this variable to add and controll more "main tabs".
Here is the snip I tried:

if (isset($_GET['page'])) && page="My-First-Article"
$current_action = 'Article1';
else
$current_action="Any-Other"


Basically I need help to figure out what the "page action" value is in URL ~http://site.com/index.php?page=A-B-C

Not much php skill just ideas :).
Thanks for your time!
Title: Re: How to detect current page/article in URL
Post by: jacortina on November 20, 2007, 01:43:13 AM
To put it simply:

$_GET['page']

Title: Re: How to detect current page/article in URL
Post by: lebisol on November 20, 2007, 02:08:07 AM
..and that simply did it  ;)
thanks J.A.Cortina!