CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Custom template variables and menu items

Print topic Send  topic

Author Message
DvdW

Posts: 10
Posted: 04/25/2012, 12:53 AM

Hi,

I make a bridge with another post wich concerned Default Menu item.


After an answer post, I've try to modify the custom template variable for the class of the item (see below). It doesn't work with the default custom template variable (MainMenu:Submenu) but it works fine if I add a new custom template variable (MainMenu:MSubmenu).


So, why it works with a new variable and not with the existing one ?


HTML
--------
<!-- BEGIN Item -->
<!-- BEGIN OpenLevel --><ul><!-- END OpenLevel -->
<li><a href="{ItemLink_Src}" class="{MainMenu:Submenu}{MainMenu:MSubmenu}" target="{MainMenu:Target}" title="{MainMenu:Title}">{ItemLink}</a>
<!-- BEGIN CloseItem --></li><!-- END CloseItem -->
<!-- BEGIN CloseLevel --></ul></li><!-- END CloseLevel -->
<!-- END Item -->


Doesn't work
------------------
global $FileName, $Tpl;

if ($FileName == "destinations_list.php") {
if ($Header->MainMenu->ItemLink->GetValue() == "Destinations") $Tpl->SetVar("MainMenu:Submenu", "active");
else $Tpl->SetVar("MainMenu:Submenu", "");
}

OK
----
global $FileName, $Tpl;

if ($FileName == "destinations_list.php") {
if ($Header->MainMenu->ItemLink->GetValue() == "Destinations") $Tpl->SetVar("MainMenu:MSubmenu", "active");
else $Tpl->SetVar("MainMenu:MSubmenu", "");
}

if ($FileName == "quartiers.php") {
if ($Header->MainMenu->ItemLink->GetValue() == "Destinations") $Tpl->SetVar("MainMenu:MSubmenu", "active");
else $Tpl->SetVar("MainMenu:MSubmenu", "");
}
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.