SametALMDR Posted January 18, 2021 Share Posted January 18, 2021 Hello everyone , I would like to ask a question about variables that came in and out in new version. In previous versions , I could use $clientAlerts variable in every custom page. In the new version, ı can't do it. I check the variables that exist in the page using {debug} in a custom tpl file. But it seems that some of the variables are gone. How can ı access or define the $clientAlerts variables guys or moderators? Can you explain? Thank you before you answering ... 0 Quote Link to comment Share on other sites More sharing options...
SametALMDR Posted January 19, 2021 Author Share Posted January 19, 2021 @brian! Can you help me please :(( 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 19, 2021 Share Posted January 19, 2021 20 hours ago, SametALMDR said: I would like to ask a question about variables that came in and out in new version. In previous versions , I could use $clientAlerts variable in every custom page. In the new version, ı can't do it. are you sure? you should be able to. 20 hours ago, SametALMDR said: I check the variables that exist in the page using {debug} in a custom tpl file. But it seems that some of the variables are gone. How can ı access or define the $clientAlerts variables guys or moderators? Can you explain? it works for me on a custom page - if i take the code from header.tpl and put it in a custom .tpl file... {foreach $clientAlerts as $alert} <li> <a href="{$alert->getLink()}"> <i class="fas fa-fw fa-{if $alert->getSeverity() == 'danger'}exclamation-circle{elseif $alert->getSeverity() == 'warning'}exclamation-triangle{elseif $alert->getSeverity() == 'info'}info-circle{else}check-circle{/if}"></i> <div class="message">{$alert->getMessage()}</div> </a> </li> {foreachelse} <li class="none"> {$LANG.notificationsnone} </li> {/foreach} it works for me in Six, 21 or a child of either. 0 Quote Link to comment Share on other sites More sharing options...
SametALMDR Posted January 20, 2021 Author Share Posted January 20, 2021 6 hours ago, brian! said: are you sure? you should be able to. it works for me on a custom page - if i take the code from header.tpl and put it in a custom .tpl file... {foreach $clientAlerts as $alert} <li> <a href="{$alert->getLink()}"> <i class="fas fa-fw fa-{if $alert->getSeverity() == 'danger'}exclamation-circle{elseif $alert->getSeverity() == 'warning'}exclamation-triangle{elseif $alert->getSeverity() == 'info'}info-circle{else}check-circle{/if}"></i> <div class="message">{$alert->getMessage()}</div> </a> </li> {foreachelse} <li class="none"> {$LANG.notificationsnone} </li> {/foreach} it works for me in Six, 21 or a child of either. I'm so sorry because ı forgot to initialize the page using $ca->initPage() 😄 1 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.