Greetings Friends,
I get the values from user defined tags(UTD). But I unable to check the if condition. Please look the following my code.
Please give the solution...
Page name is test
activelink----- UDT
===============
$pageurl=count(explode('/',$_REQUEST["page"]));
if($pageurl==1)
{
echo $pagename=$_REQUEST["page"];
}
else
{
echo $pagename=end(explode('/',$_REQUEST["page"]));
}
Global Content blocks
-----------------------------
{if activepagelinktest eq 'test'} welcome {/if}
Please give the solution for me...
Regards
Kumaran
User defined Tags -- Conditions are not checked -- give the solution
Re: User defined Tags -- Conditions are not checked -- give the solution
You display the value (echo) then you don't have any value.kumaran wrote: I get the values from user defined tags(UTD). But I unable to check the if condition. Please look the following my code.
And where is your UDT (activelink) call?
Alby
Re: User defined Tags -- Conditions are not checked -- give the solution
Hi Alby,
I call the {activelink} in global content pages. But inner i check the condition for example below.
{if activelink eq 'test'} get the blank of the result is empty. How I check the condition...
Please guide me, very urgent...
Thanks & Regards
Kumaran
I call the {activelink} in global content pages. But inner i check the condition for example below.
{if activelink eq 'test'} get the blank of the result is empty. How I check the condition...
Please guide me, very urgent...
Thanks & Regards
Kumaran
Re: User defined Tags -- Conditions are not checked -- give the solution
The active link should be the page alias of the currently displayed page, shouldn't it?
Use {get_template_vars} to see what template vars contains what data.
You don't need an UDT to get the active link.
Use {get_template_vars} to see what template vars contains what data.
You don't need an UDT to get the active link.
Re: User defined Tags -- Conditions are not checked -- give the solution
yes, if it's then:NaN wrote: The active link should be the page alias of the currently displayed page, shouldn't it?
Code: Select all
{if $page_alias eq 'test'} welcome {/if}
Code: Select all
global $gCms;
$pageurl=count(explode('/',$_REQUEST["page"]));
if($pageurl==1)
{
$pagename=$_REQUEST["page"];
}
else
{
$pagename=end(explode('/',$_REQUEST["page"]));
}
$gCms->smarty->assign('activepagelinktest', $pagename);
{if $activepagelinktest eq 'test'} welcome {/if}
Alby