Jump to content

php $page definition and navigation


Recommended Posts

On my site prestashop is in a subdirectory, so I have a main navigation that goes to different parts of the site, ir blog, events, shop, etc.

I typically use php to define the page at the very top of it...

<?php $page = 'press' ?>

This is then used in my navigation bar...

<?php if ($page == 'press') { ?>
Press
<?php } else { ?>
Press
<?php } ?>

etc.

and my css creates the nav bar with different backgrounds depending on link, no link, and hover.

This does not work with the shop directory that prestashop was in. I tried writing it to the top of the header.tpl, but it actually gets printed in the source code, just as text. I am not sure why the php is not getting read, since I have includes later in the header that actually write the external navigation bar. (the PS nav is used as a sub nav for the shopping section).

Is there someplace that I can define every prestashop page as $page = 'shop' via php so that my nav will show when you are in the shop section?

Does this make sense?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...