January 6th, 2014AWM: How to pass a PHP variable to a menu item link
Knowledge Base support case for AllWebMenus Pro, abstracted and stripped of all user’s private info.
Initial Email From: Jim
Initial Email Subject: Passing PHP variable to URL
Support Case Month: July 2013
I need to pass a variable, via PHP, to each URL in my menu as follows:
?BG=<?php echo $bg; ?>
so that the url would look like loading.php?BG=<?php echo $bg; ?> ... and it would resolve with the appropriate variable.
Couldn't find answer in knowledge base.
Reply From: Likno Customer Support
In order to achieve that, you should populate your menu through UL/LI structure.
Choose the following option in your AllWebMenus project:
Then click on the "Settings" in order to make the settings that perfectly work for you.
A UL/LI structure in your page could look like the one below:
<ul id="awmULLI-menu" style="display:none;">
<li><a href="test.php?BG=<?php echo $bg1; ?>">Main Item 1</a></li>
<li>Main Item 2
<li><a href="test.php?BG=<?php echo $bg2; ?>">Sub Item 1</a></li>
<li>Sub Item 2
<li>Sub Item 4</li>
<li>Sub Item 5</li>
<li><a href="test.php?BG=<?php echo $bg3; ?>">Sub Item 6</a></li>
<li>Sub Item 3</li>
<li>Main Item 3</li>
Let me know if you need any more information.
Likno Customer Support