ps4player Posted December 9, 2017 Share Posted December 9, 2017 I want to remove or change URLs of the Recent News in clientarea home, So i need hook to do that, is this possible? May related:https://whmcs.community/topic/259485-define-clientarea-displayed-blocks/https://docs.whmcs.com/Working_With_Client_Area_Home_Page_Panelshttps://docs.whmcs.com/Client_Area_Navigation_Menus_Cheatsheet Link to comment Share on other sites More sharing options...
brian! Posted December 9, 2017 Share Posted December 9, 2017 10 hours ago, ps4player said: I want to remove or change URLs of the Recent News in clientarea home, So i need hook to do that, is this possible? you can change the URL - but if it's a recent version, the URLs are changed by the Friendly URLs setting... are you running into an issue with that? which WHMCS version are you using and what do you want to change the URL to?? Link to comment Share on other sites More sharing options...
ps4player Posted December 9, 2017 Author Share Posted December 9, 2017 5 hours ago, brian! said: you can change the URL - but if it's a recent version, the URLs are changed by the Friendly URLs setting... are you running into an issue with that? which WHMCS version are you using and what do you want to change the URL to?? Its version 7.2 I want to point all Recent News to announcements.php if possible Link to comment Share on other sites More sharing options...
brian! Posted December 9, 2017 Share Posted December 9, 2017 6 hours ago, ps4player said: Its version 7.2 I want to point all Recent News to announcements.php if possible quickly tested on v7.4, but can see no reason why it wouldn't work on v7.2... <?php # Modify Recent News Links Hook # Written by brian! use WHMCS\View\Menu\Item; add_hook('ClientAreaHomepagePanels', 1, function(Item $homePagePanels) { $recentnews = $homePagePanels->getChild("Recent News"); if (empty($recentnews)) { return; } $recentchildren = $recentnews->getChildren(); foreach($recentchildren as $key => $child) { $recentnews->getChild($key) ->setURI('announcements.php'); } }); 1 Link to comment Share on other sites More sharing options...
ps4player Posted December 10, 2017 Author Share Posted December 10, 2017 Thank you @brian! Yes working Link to comment Share on other sites More sharing options...
Recommended Posts