Jump to content

Need Quick Explanation on Syntax Please and makeshift navtrail help


blesseld

Recommended Posts

Hey All,

 

Now I have no idea what I am doing to create what I want, but i'm willing to tackle it,  need just a little clarification and maybe a finger pointing in a direction.

Any help is much appreciated.

 

Here it goes.

 

I'm trying to make a makeshift nav trail to show users where they are, based on variables that are already declared.

 

  <?=$nav_trail_root?>
            <?=$nav_trail_category?>
            <?=$nav_trail_page?>

Right now I put these in my page to see if the variables were working, and they are, they return the values.

 

I tried this first

<?php 
if ($nav_trail_root == "browse-places") 
echo "<a href="#">test link</a>"
?>

 

Of course it did not work,  with a bit of research I found this:

 

<?php 
if ($nav_trail_root == "browse-places") 
echo ("<a href='#'\">".Test."</a>");
?>

 

Works to put a link in,  no idea why though.  anyone care to explain?

 

Over all now, what I am trying to achieve is creating a makeshift navtrail using the 3 variables to output their links in a line

  <?=$nav_trail_root?>
            <?=$nav_trail_category?>
            <?=$nav_trail_page?>

root is the main link, when you hover over it expands some sub categories, and hovering over those sub categories expands the end pages.

 

Any idea how I could build somthing like,

 

If <?=$nav_trail_root?> == "root nav item" ------create link, and if <?=$nav_trail_category?> == category2 ---create proper link  and last <?=$nav_trail_page?> current page ---create link.

 

No idea what direction to start.

 

Any help would be greatly appreciated

Thanks

Carlo

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.