zdcloud Posted April 27, 2023 Share Posted April 27, 2023 When I write the following code in header.tpl, it only shows on the home page and announcement page, I want it to show on all pages, can anyone help me? {foreach $announcements as $announcement} {if $announcement@index < 1} <li class="nav-item"> <a class="nav-link" aria-current="page" href="{routePath('announcement-view', $announcement.id, $announcement.urlfriendlytitle)}"> <span>{$announcement.title}</span> </a> </li> {/if} {/foreach} 0 Quote Link to comment Share on other sites More sharing options...
Solution andrezzz Posted April 29, 2023 Solution Share Posted April 29, 2023 Hello, How are you? Seems like that the Smarty Variable announcements, it's only sent on certain pages, as you told. For this, I made a Hook to add to every page. Can you test it out? Upload the file, in attachments, to the folder `includes/hooks/`, on your WHMCS root. Kind regards. AnnouncementsAllClientAreaPages.php 1 Quote Link to comment Share on other sites More sharing options...
zdcloud Posted April 29, 2023 Author Share Posted April 29, 2023 1 minute ago, andrezzz said: Hello, How are you? Seems like that the Smarty Variable announcements, it's only sent on certain pages, as you told. For this, I made a Hook to add to every page. Can you test it out? Upload the file, in attachments, to the folder `includes/hooks/`, on your WHMCS root. Kind regards. AnnouncementsAllClientAreaPages.php 1.98 kB · 0 downloads Special thanks to you! It worked as expected. 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.