Jump to content
ChurchPath

[SOLVED] Permalink block question

Recommended Posts

Hi everyone,
Can someone tell me how I can add additional pages to the permalink pages menu - just like Contact, SiteMap, etc.
I wish to create some more pages and have them appear in the same menu area as the above pages.
thanks,
ChurchPath.

Share this post


Link to post
Share on other sites

Thats quite easy to do, all you need to do as a new entry to your blockpermanentlinks.tpl file, blockpermanentlinks-header.tpl and also a corresponding div in your global.css file, and also upload new icons to your /yourthemefolder/img/icons/ folder

I have done an example below to add a "home" link that will be first inline.

In the blockpermanentlinks.tpl i would add the following code

    <!-- Home -->

 
{l s='Home' mod='blockpermanentlinks'}



In blockpermananetlinks-header.tpl file I would add.

        {l s='Home' mod='blockpermanentlinks'}



Then in global.css file add

#header_links #header_link_homepage a {
   background-image: url('../img/icon/home.gif');



The result of in shown in the image below. Obviously the icon would be whatever you wanted it to be.

4374_VAclrcS2pPNipSRXzDlk_t

Share this post


Link to post
Share on other sites

By the way the little icon images are about 18x18 pixels roughly, if you didnt already know, and if you wanted to move the link along the row, just change the position in the files.

Share this post


Link to post
Share on other sites

Hello,

I did what you guys told me but something is wrong.
My template is all messed up on the top now.
Im no big expert on script, please assist.
]Check my website

My Global.css Top Part

/*
   PrestaShop CSS
   18 used colors : 
   10 grays: #374853 #595a5e #5d717e #76839b #888 #bdc2c9 #d0d1d5 #d0d3d8 #e5e6e7 #f1f2f4
   4 fushias: #f6dce8 #dd2a81 #971d58 #5d0630
   2 yellows: #f8e1a0 #f9e400
   1 green: #488c40
   1 red: #da0f00
*/

* {
   padding:0;
   margin:0;
}
#header_links #header_link_homepage a {
   background-image: url('../img/icon/home.gif'); 
}
body {
   background-color: white;
   font-size: 11px;
   font-family: Verdana, Arial, Helvetica, Sans-Serif;
   color: #5d717e;
   text-align:center;
}



My blockpermanentlinks.tpl

<!-- Block permanent links module -->

   <!-- Home -->

 
{l s='Home' mod='blockpermanentlinks'}

   <!-- Sitemap -->

 
{l s='sitemap' mod='blockpermanentlinks'}

   <!-- Contact -->

 
{l s='contact' mod='blockpermanentlinks'}

   <!-- Bookmark -->

       [removed]writeBookmarkLink('{$come_from}', '{$shop_name|addslashes|addslashes}', '{l s='bookmark this page' mod='blockpermanentlinks'}', '{$img_dir}icon/star.gif');[removed] 


<!-- /Block permanent links module -->



My blockpermanentlinks-header.tpl

><!-- Block permanent links module HEADER -->
</pre>
<ul>
{l s='Home' mod='blockpermanentlinks'}
 {l s='contact' mod='blockpermanentlinks'}
{l s='sitemap' mod='blockpermanentlinks'}

       [removed]writeBookmarkLink('{$come_from}', '{$shop_name|addslashes|addslashes}', '{l s='bookmark' mod='blockpermanentlinks'}');[removed]

</ul>
<br><!-- /Block permanent links module HEADER --&gt



I hope someone can help me out on this one :)

Share this post


Link to post
Share on other sites

What should your template look like exactly, without knowing, no-one can help with code changes.

Share this post


Link to post
Share on other sites

Yes I can see what you site looks like now, but what do you want your site to like, where do you want the search and accounts area for example?

Share this post


Link to post
Share on other sites

Ok hopefully this should work

in your global.css file change the following

line 189 width change to 21%

line 194 change width to 77%

Share this post


Link to post
Share on other sites

So like this:

h1#logo {
   float: left;
   width: 21%;
   margin-top:0.5em;
}
#header {
   float: left;
   height:100px;
   width: 77%;
   text-align: right;



That did not work, it did nothing but move to the left a bit :(

Share this post


Link to post
Share on other sites

This is the best i can do, check the site again please.

This is the code now:

h1#logo {
   float: left;
   width: 21%;
   margin-top:0.5em;
}
#header {
   float: right;
   height:100px;
   width: 80%;
   text-align: right;



I made the header float right and that did make it better a bit.
If i leave i float left then the whole bar goes under the logo to to left.

Share this post


Link to post
Share on other sites

add margin-top: -8em to the header section, that will move it back up to the top of the page.

Share this post


Link to post
Share on other sites

Haha you are coool :) check it out! it works, now i need it to come a bit to the right, witch one do i change?
Thank you so much for helping me out on this :)

Share this post


Link to post
Share on other sites

Hi Guys,

You make it look/sound soooo easy! Unfortunately if only it could be more simple (ie modifications in the admin panel)...

What I am confused with is where to look for the various .tpl files listed in the posts above...and then of course the global CSS file??? I desperately need to add additional MENU links for my intended store...appreciate the assistance,

Please help! PrestaShop Go Go Go

Share this post


Link to post
Share on other sites
Hi Guys,

You make it look/sound soooo easy! Unfortunately if only it could be more simple (ie modifications in the admin panel)...

What I am confused with is where to look for the various .tpl files listed in the posts above...and then of course the global CSS file??? I desperately need to add additional MENU links for my intended store...appreciate the assistance,

Please help! PrestaShop Go Go Go


But its not easy :)
Find the .tpl files here: modules/blockpermanentlinks/
global scc file here: themes/prestashop/css/

Share this post


Link to post
Share on other sites

I add this and everything is working correctly but the icon isn't showing up any ideas?

blockpermanentlinks.tpl

<!-- RSS -->

 
{l s='RSS' mod='blockpermanentlinks'}



blockpermantentlinks-header.tpl

{l s='RSS' mod='blockpermanentlinks'}

Share this post


Link to post
Share on other sites

Hi,

I am trying to add a "Main Website" link in this nave bar, the shop sits in /store and I wanted a link in here back to the main website, any idea of the code I would need to make it work please.

Share this post


Link to post
Share on other sites

Hi mod,

 

Am I right to say that the links are hardcoded and not configurable through the backend dashboard?

 

Thats quite easy to do, all you need to do as a new entry to your blockpermanentlinks.tpl file, blockpermanentlinks-header.tpl and also a corresponding div in your global.css file, and also upload new icons to your /yourthemefolder/img/icons/ folder

I have done an example below to add a "home" link that will be first inline.

In the blockpermanentlinks.tpl i would add the following code
 

<!-- Home -->    <div class="homepage">        <a href="{$base_dir}index.php"><img src="{$img_dir}icon/home.gif" alt="{l s='Home' mod='blockpermanentlinks'}" title="{l s='Home' mod='blockpermanentlinks'}"></a>         <a href="{$base_dir}index.php">{l s='Home' mod='blockpermanentlinks'}</a>    </div>

In blockpermananetlinks-header.tpl file I would add.

<li id="header_link_homepage"><a href="{$base_dir}index.php" title="{l s='Homepage' mod='blockpermanentlinks'}">{l s='Home' mod='blockpermanentlinks'}</a></li>

Then in global.css file add

#header_links #header_link_homepage a {    background-image: url('../img/icon/home.gif');

The result of in shown in the image below. Obviously the icon would be whatever you wanted it to be.

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More