Basheer Posted May 18, 2017 Share Posted May 18, 2017 Hi, I can see a code like " {if $title} <h2>{$title}</h2> {/if} {$msg} " in template/includes/alert.tpl. In my custom page $ca->setPageTitle('Test'); In this case i get "Test" as {$title}, My question is what is the value of{$msg} (I tried assign('msg','some value')); But it is not working. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 18, 2017 Share Posted May 18, 2017 isn't $msg defined in the template, e.g in clientareadomaindns.tpl... {if $error} {include file="$template/includes/alert.tpl" type="error" msg=$error} {/if} or in clientregister.tpl... {if $registrationDisabled} {include file="$template/includes/alert.tpl" type="error" msg=$LANG.registerCreateAccount|cat:' <strong><a href="cart.php" class="alert-link">'|cat:$LANG.registerCreateAccountOrder|cat:'</a></strong>'} {/if} off the top of my head, I don't recall ever defining it's value in the PHP file... 0 Quote Link to comment Share on other sites More sharing options...
Basheer Posted May 19, 2017 Author Share Posted May 19, 2017 Sorry Brian, I didnt get you, {if $title} <h2>{$title}</h2> {/if} {$msg} This is in alert.tpl I want to pass some value to $msg varibale from my custom page. How can it possible? I tried $a->assign()function but it is not worked. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 19, 2017 Share Posted May 19, 2017 I assume your custom page is in two parts - the .php file that creates the page and the template that contains the content... what i'm suggesting is that you define what $msg is in the template and not in the PHP file like you're trying to do. 0 Quote Link to comment Share on other sites More sharing options...
Basheer Posted May 22, 2017 Author Share Posted May 22, 2017 Thank You Brian 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.