1259 Posts in 348 Topics by 484 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1466 Views |
-
If else ?

20 July 2010 at 3:45am
Hi,
I need do this:
<?php
if ($_GET['page'] == 'news')
{
do nothink
}
else{
generate submenu
}?>
.......
I have 5 main pages -> 2 of them have submenu ... I want show only 1 of them submenu.. second -> I dont wanna generate in html submenu.
I know, that it is possible turn-off in admin (show in menus - on/off) but I can't change this..
-
Re: If else ?

20 July 2010 at 1:16pm
Do you need to do this in the template? or in the cms?. In the front end you need to write a function which detects the get var (are you sure you want to use get and not the URLParams ?) so in Page.php something like
function IsNews() {
return isset($_GET['news']);
}Then in the template you can do <% if IsNews %> ... <% else %>... <% end_if %>
| 1466 Views | ||
|
Page:
1
|
Go to Top |


