JelleG Posted June 21, 2016 Share Posted June 21, 2016 (edited) Hi, I want to hide some default columns on the clientarea page. I want to hide the Domains Expiring block, the Register New Domain block and the Recent News block. How can I achieve that? The default code looks like this: {foreach from=$addons_html item=addon_html} <div> {$addon_html} </div> {/foreach} <div class="client-home-panels"> <div class="row"> <div class="col-sm-6"> {function name=outputHomePanels} <div menuItemName="{$item->getName()}" class="panel panel-default panel-accent-{$item->getExtra('color')}{if $item->getClass()} {$item->getClass()}{/if}"{if $item->getAttribute('id')} id="{$item->getAttribute('id')}"{/if}> <div class="panel-heading"> <h3 class="panel-title"> {if $item->getExtra('btn-link') && $item->getExtra('btn-text')} <div class="pull-right"> <a href="{$item->getExtra('btn-link')}" class="btn btn-default bg-color-{$item->getExtra('color')} btn-xs"> {if $item->getExtra('btn-icon')}<i class="fa {$item->getExtra('btn-icon')}"></i>{/if} {$item->getExtra('btn-text')} </a> </div> {/if} {if $item->hasIcon()}<i class="{$item->getIcon()}"></i> {/if} {$item->getLabel()} {if $item->hasBadge()} <span class="badge">{$item->getBadge()}</span>{/if} </h3> </div> {if $item->hasBodyHtml()} <div class="panel-body"> {$item->getBodyHtml()} </div> {/if} {if $item->hasChildren()} <div class="list-group{if $item->getChildrenAttribute('class')} {$item->getChildrenAttribute('class')}{/if}"> {foreach $item->getChildren() as $childItem} {if $childItem->getUri()} <a menuItemName="{$childItem->getName()}" href="{$childItem->getUri()}" class="list-group-item{if $childItem->getClass()} {$childItem->getClass()}{/if}{if $childItem->isCurrent()} active{/if}"{if $childItem->getAttribute('dataToggleTab')} data-toggle="tab"{/if}{if $childItem->getAttribute('target')} target="{$childItem->getAttribute('target')}"{/if} id="{$childItem->getId()}"> {if $childItem->hasIcon()}<i class="{$childItem->getIcon()}"></i> {/if} {$childItem->getLabel()} {if $childItem->hasBadge()} <span class="badge">{$childItem->getBadge()}</span>{/if} </a> {else} <div menuItemName="{$childItem->getName()}" class="list-group-item{if $childItem->getClass()} {$childItem->getClass()}{/if}" id="{$childItem->getId()}"> {if $childItem->hasIcon()}<i class="{$childItem->getIcon()}"></i> {/if} {$childItem->getLabel()} {if $childItem->hasBadge()} <span class="badge">{$childItem->getBadge()}</span>{/if} </div> {/if} {/foreach} </div> {/if} <div class="panel-footer"> {if $item->hasFooterHtml()} {$item->getFooterHtml()} {/if} </div> </div> {/function} {foreach $panels as $item} {if $item@iteration is odd} {outputHomePanels} {/if} {/foreach} </div> <div class="col-sm-6"> {foreach $panels as $item} {if $item@iteration is even} {outputHomePanels} {/if} {/foreach} </div> </div> </div> Edited June 21, 2016 by JelleG 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted June 21, 2016 Share Posted June 21, 2016 it does not work this way, you can control it from ActionHooks, create new PHP file inside /includes/hooks/ directory and put the following code inside it and all the three block will disappear <?php use WHMCS\View\Menu\Item; add_hook("ClientAreaHomepagePanels", 1, function(Item $homePagePanels){ if (!is_null($homePagePanels->getChild('Recent News'))){ $homePagePanels->removeChild('Recent News'); } if (!is_null($homePagePanels->getChild('Register a New Domain'))){ $homePagePanels->removeChild('Register a New Domain'); } if (!is_null($homePagePanels->getChild('Domains Expiring Soon'))){ $homePagePanels->removeChild('Domains Expiring Soon'); } }); 0 Quote Link to comment Share on other sites More sharing options...
HostGenius Posted June 24, 2016 Share Posted June 24, 2016 thank you for the hook 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.