|
uCoz Community Archives Locked Coding => If page1 then bar changes color |
Coding => If page1 then bar changes color |
How can i create code/script which changes color for my navigation menu by switching pages?
For example: Page1 => http://mysite/news/ I thought i can make it like this: <?if(http://mysite/news/)?> Menu bar color is white <?else?> // Else if page is http://mysite/blog/ Menu bar color is red <?endif?> I tried ... Didnt work. Can someone please help me with this? Sorry for my bad english |
Gest3r, please provide website URL
this would be useful also "Conditional Operators" To busy building a passive income online ;)
|
I just found "Conditional operator" $PAGE_ID$ it says:
Code $MODULE_ID$, $PAGE_ID$, $URI_ID$ - special codes, which may be useful for outputting different text or some other code for different pages, using the same template. For example, forum has many different pages, but only one template, however with the help of $PAGE_ID$ code some text can be displayed on necessary pages only. Examples: <?if($PAGE_ID$='main')?>Forums main page<?endif?> <?if($PAGE_ID$='addthread' || $PAGE_ID$='addpoll')?><b>Read forum rules!!!</b><?endif?> <?if($PAGE_ID$='recentthreads')?>Recent threads<?endif?> There is <?if($PAGE_ID$='main')?>. How can i make this for news, blog and publ? I must type <?if($PAGE_ID$='news')?> ????? |
| |||
| |||