Jump to content

Question

Posted

Hi all, I am new to Blesta and firstly just want to say that it's awesome software and thanks to everyone who posts solutions on the forums, they've already helped me numerous times while customising my installation.

I would really appreciate some expert assistance with creating a custom function that will allow me to show a different navigation menu to users who reach my site and are not logged in. For example, this might happen when clicking on a package link from my main site and starting the order process. At this point, I would like them to see a menu that replicates my main sites menu.

So basically I would like a function that performs the following - if user is logged in = true, display navmenu1, else display navmenu2.

Is this possible, if so, what code would I need, and where would i need to put it. Where would I need to create the new menu? I'm thinking that I might need to make it an entire new header which is fine.

Keep in mind that I am no coder and my coding knowledge is baby level, so as much details as possible would nice :)

Thanks so much to anyone that takes the time to answer this.

 

1 answer to this question

Recommended Posts

  • 0
Posted

The navigation menu can be found on /app/views/client/bootstrap/structure.pdt, in this file is available the $logged_in variable, which allows you to know if a user has logged in or not.

<?php
if ($this->Html->ifSet($logged_in)) {
?>
    <!-- The user is logged in: navmenu1 -->
<?php
} else {
?>
    <!-- The user is not logged in: navmenu2 -->
<?php
}
?>

 

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...