• Page 1 of 1
  • 1
Coding => If page1 then bar changes color
Gest3r
Posts: 16
Reputation: 0

Message # 1 | 9:20 AM
How can i create code/script which changes color for my navigation menu by switching pages?

For example:

Page1 => http://mysite/news/
Page2 => http://mysite/blog/

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

Animorph
Posts: 2856
Reputation: 189

Message # 2 | 1:01 PM
Gest3r, please provide website URL

this would be useful also "Conditional Operators"
http://www.forum.ucoz.com/forum/37-471-1


To busy building a passive income online ;)
Gest3r
Posts: 16
Reputation: 0

Message # 3 | 1:28 PM
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')?> ?????

Natashko
Posts: 3366
Reputation: 171

Message # 4 | 8:19 AM
Gest3r, in a condition use $MODULE_ID$ instead of $PAGE_ID$. You may find it in Builder->List of page variables
  • Page 1 of 1
  • 1
Search: