Jump to content

How to point logo i WHMCS client area to my actual website homepage


kingsleymensah

Recommended Posts

8 hours ago, kingsleymensah said:

I want to point my logo in whmcs clientarea to my actual website homepage.

the logo URL link is in header.tpl

        {if $assetLogoPath}
            <a href="{$WEB_ROOT}/index.php" class="logo"><img src="{$assetLogoPath}" alt="{$companyname}"></a>
        {else}
            <a href="{$WEB_ROOT}/index.php" class="logo logo-text">{$companyname}</a>
        {/if}

so you could edit that to change the URL of the logo image link...

8 hours ago, kingsleymensah said:

Also point the Home menu to "clientarea.php" login page. 

you can do that with a hook - though you only really have to do it for users that aren't logged in - because, once they are logged in, the home menu links to clientarea.php and not index.php anyway.

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)
{
	$client = Menu::context('client');
	if (is_null($client) && !is_null($primaryNavbar->getChild('Home'))) {
		$primaryNavbar->getChild('Home')->setUri('clientarea.php');
	}
});
Link to comment
Share on other sites

2 minutes ago, brian! said:

the logo URL link is in header.tpl


        {if $assetLogoPath}
            <a href="{$WEB_ROOT}/index.php" class="logo"><img src="{$assetLogoPath}" alt="{$companyname}"></a>
        {else}
            <a href="{$WEB_ROOT}/index.php" class="logo logo-text">{$companyname}</a>
        {/if}

so you could edit that to change the URL of the logo image link...

you can do that with a hook - though you only really have to do it for users that aren't logged in - because, once they are logged in, the home menu links to clientarea.php and not index.php anyway.


<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)
{
	$client = Menu::context('client');
	if (is_null($client) && !is_null($primaryNavbar->getChild('Home'))) {
		$primaryNavbar->getChild('Home')->setUri('clientarea.php');
	}
});

yhh go that...what about the secon problem

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated