Hello Amember community I am developing a site, where my header menus are different depending on whether a user is logged in or not. For the 'logged in' cases, users get different heading in the menu. For my member-side and protected pagesI have no probs: I just point the pages to use the correct header code. However, if a user is logged in, but navigates back to, say, the company homepage, then obviously that HTML page loads the other (i.e. non-logged-in) menu. Is there a slice of JS or PHP code I can put in my HTML to detect whether the visitor to the page is logged in - and thus use the different menu code that I have? As I say, the member-side pages are fine, It is the pages outside the member-zone / protection that I want to respond, depending on the viewer's status. Thanks in advance for any tips!
I am afraid it is not possible to use PHP code in html files by default. Anyway there is workaround http://stackoverflow.com/questions/11312316/how-do-i-add-php-code-file-to-html-html-files Then you can use Am_Lite API http://www.amember.com/docs/API/Lite PHP: <?php if (Am_Lite::getInstance()->isLoggedIn()) : ?><p>Html for logged in user</p><?php else: ?><p>Html for guest (not logged in)</p><?php endif; ?>