Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using active menu

Featured Replies

I'm new here on the forum, and I have a problem I can not solve ... I want that when I click on the menu it becomes selected and when I change the page selection is for the menu page is too just do not know how to do this ... could someone help me?

 

my code

 

<div id="menu">

<ul>

<li><a href="<?php echo $urlbase_config; ?>" title="Home">Home</a></li>

<li><a href="<?php echo $urlbase_config; ?>services" title="Services">Services</a></li>

<li><a href="<?php echo $urlbase_config; ?>work" title="Work">Works</a></li>

<li><a href="<?php echo $urlbase_config; ?>contact" title="Contact">Contact</a></li>

</ul>

</div><!--menu-->

Edited by Psythis

I think you mean that you want the current page link highlighted in the menu. Have a look at

http://www.wickham43.net/highlighthome.php

Item 1 is simple but not recommended as you cannot use that method with a PHP "include" file.

Items 2, 3 and 4 are better.

  • Author

I tried based on that link and could not ... Anyone have any other ideas? Just missing at this site ...

 

I'm using everything in header.php file that has all the header data, the menu is dynamic and takes the url variable $urlbase_config ... any tips guys?

 

 

 

I'm trying to use a code like this

 

<a href = "index.php? Page = nav / start" <? php if ($ _GET ['page'] == "nav / start") {echo 'class = "active"';}?>

 

How to use my menu that is by variable?

 

<a href = "<? php echo $ urlbase_config;?>" title = "Home"> Home </ a>

Edited by Psythis

Please try this method for active menu if you use a unique header file

 

 

<?php

$currentFile = $_SERVER["PHP_SELF"];

$parts = Explode('/', $currentFile);

$url= $parts[count($parts) - 1];

?>

 

<ul>

<li ><a <?php if($url=="index.php")

{

?>

class="mover"

<?php

}

?> href="index.php"> Home </a></li>

<li><a <?php if($url=="greenfrog.php")

{

?>

class="mover"

<?php

}

?> href="greenfrog.php">Green Frog</a></li>

 

</ul>

 

Working demo please go through our website http://www.greenfrog.in

Edited by arunsuku4u

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.