Announcement

#1 2012-04-08 12:10:10

boone
Member
2012-04-08
2

[SOLUTION] How to add a blog or custom link to menu bar.

For those looking to add a blog or custom link to the menu bar as per the image below, use the following steps.

http://img833.imageshack.us/img833/8329/bloglinkv.png

In stripped only (you will have to try this in other themes yourselves.)



1. To add it to the albums page menu bar.

Go to themes/stripped/template

find index.tpl, rename as indexOLD.tpl

open in a good editor and find

Code:

<div class="titrePage">
  <div class="browsePath">
    <span id="menuswitcher" title="{'Show/hide menu'|@translate}">{'Menu'|@translate}</span><span class="arrow"> »</span>
    <h2>{$TITLE}</h2>
  </div>

and replace with

Code:

<div class="titrePage">
  <div class="browsePath">
    <span id="menuswitcher" title="{'Show/hide menu'|@translate}">{'Menu'|@translate}</span><span class="arrow"> »</span>
    <a href="http://example.com/blog" title="Blog">Blog</a><span class="arrow"> »</span>
    <h2>{$TITLE}</h2>        
  </div>

Save as index.tpl, and upload back to the same location.



2. To add to the about page menu bar.

Go to themes/stripped/template

find about.tpl, rename as aboutOLD.tpl

open in a good editor and find

Code:

<div class="titrePage">
  <div class="browsePath">
    <h2>
      {if isset($MENUBAR)}
        <span id="menuswitcher" title="{'Show/hide menu'|@translate}">{'Menu'|@translate}</span><span class="arrow"> »</span>
      {/if}
      <a href="{$U_HOME}">{'Home'|@translate}</a>
      {$LEVEL_SEPARATOR}{'About'|@translate}
    </h2>
  </div>
</div>

and replace with

Code:

<div class="titrePage">
  <div class="browsePath">
    <h2>
      {if isset($MENUBAR)}
        <span id="menuswitcher" title="{'Show/hide menu'|@translate}">{'Menu'|@translate}</span><span class="arrow"> »</span>
        <a href="http://example.com/blog" title="Blog">Blog</a><span class="arrow"> »</span>
      {/if}
      <a href="{$U_HOME}">{'Home'|@translate}</a>
      {$LEVEL_SEPARATOR}{'About'|@translate}
    </h2>
  </div>
</div>

Save as about.tpl, and upload back to the same location.



3. To add to the contact form (plugin) page.

Go to plugins/ContactForm/themes/stripped

find cf_title.tpl, rename as cf_titleOLD.tpl

open in a good editor and find

Code:

<div class="titrePage">

  <span id="menuswitcher" title="Afficher/cacher le menu">Menu</span> »

  <ul class="categoryActions"></ul>

  <h2><a href="{$U_HOME}" title="{'Return to home page'|@translate}">{'Home'|@translate}</a>{$LEVEL_SEPARATOR}{$CF.TITLE|@translate}</h2>

</div>

Replace with

Code:

<div class="titrePage">

  <span id="menuswitcher" title="Afficher/cacher le menu">Menu</span> »

  <ul class="categoryActions"></ul>

  <a href="http://example.com/blog" title="Blog">Blog</a><span class="arrow"> »</span>
  
  <h2><a href="{$U_HOME}" title="{'Return to home page'|@translate}">{'Home'|@translate}</a>{$LEVEL_SEPARATOR}{$CF.TITLE|@translate}</h2>

</div>

Save as cf_title.tpl, and upload back to the same location.

You should now have your blog or custom link on every page. :D


Notes:

1. I dont know if this method works for other themes.
2. When you save the new files, they may be saved as .tpl.txt just remove the .txt and upload the files, should be fine.
3. Obviously change http://example.com/blog and the link name to what custom link you want.

I hope this helps someone.

Offline

 

#2 2012-04-11 07:49:15

Lisa
Member
New York
2012-04-11
12

Re: [SOLUTION] How to add a blog or custom link to menu bar.

Thank you! Great Share!

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact