Jump to content

[SOLVED] Changing Logo Link [1.4]


Recommended Posts

My store is embedded inside the rest of my site, and I would like my users to be able to navigate back to the homepage of my site (NOT the homepage of my Prestashop store) by clicking on the site logo in the upper-left hand corner.

 

Currently, this logo just links back to the homepage of my Prestashop store. How can I change where this links too?

 

I'm open to either a coding or a Back End solution, any help would be greatly appreciated.

 

Thanks.

Link to comment
Share on other sites

Hi culebra,

If you open the folder containing your theme and locate the file "header.tpl," you should find this bit of code:

 

<h1 id="logo">

            <a href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">

 

Replace {$base_dir} with your website and you should be good to go!

 

Awesome advice, that helped me figure it out.

 

Only one edit though:

 

The line of code read:

 

<div id="header">
   <a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">

 

I just changed {$base_dir} to my URL and it worked great.

 

Thanks for the advice!

Link to comment
Share on other sites

Hi culebra,

If you open the folder containing your theme and locate the file "header.tpl," you should find this bit of code:

 

<h1 id="logo">

            <a href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">

 

Replace {$base_dir} with your website and you should be good to go!

 

Awesome advice, that helped me figure it out.

 

Only one edit though:

 

The line of code read:

 

<div id="header">
   <a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">

 

I just changed {$base_dir} to my URL and it worked great.

 

Thanks for the advice!

 

 

I'm glad I could help!

 

-Mike

Link to comment
Share on other sites

Just to add a twist to this...

 

I think the homepage link on my logo is giving me a duplicate URL over at Google. It would be better if the logo linked back to the homepage on every page but the homepage. But not when you are already on the homepage.

 

I've posted a question about this on the URL duplicate redirect module thread, because I am using that module. It works well, except for this instance. So I thought I would ask here too.

 

How big a fix would this be?

Link to comment
Share on other sites

I'm not sure CraigMeade, but I think you could add a conditional statement before the URL line of the code

 


<!--Some Kind of Conditional "If URL="YOURSITE/Index.html" Then"-->

<a href="#" title="{$shop_name|escape:'htmlall':'UTF-8'}">

<!--Here is where your "Else..." line would go-->

<a href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">

 

Notice how the URL target in the first condition is the "#" sign, this should simply cause the page to reload, not causing a duplicate URL problem.

 

I'm just an amateur PHP programmer, so can't give you any exact code, but hopefully this can guide your research in the right direction.

Link to comment
Share on other sites

Well that's a lot better than my solution Culebra [i know that word! It's snake isn't it? Not bad for a Kiwi!] My fix was to open up the Google sitemap and delete the extra url. Over and over again as I develop the site and publish new sitemaps. I might try your solution after a stiff drink one evening. Good on your for the suggestion.

Link to comment
Share on other sites

  • 1 year later...

If you open the folder containing your theme and locate the file "header.tpl," you should find this bit of code:

 

<h1 id="logo">

 

<a href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">

 

Replace {$base_dir} with your website and you should be good to go i

 

i tried to change the $base_dir but when i reload the page is not found

can anyone help me out

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...