Jump to content

Breadcrumb Link Label Template Variable {$displayTitle}


Recommended Posts

How do I output targeted URL page title? Maybe I can combine {$LANG } + value hometitle => "Home" and than I can just update my lang file with a custom output for the middle?

 

{$displayTitle} displays CURRENT page not targeted page.

 

When I activated {debug} I can see exactly what I desire. See how it says link than label? How do I output that specific link label using Smarty Template Variable?

 

$breadcrumb	Smarty_Variable Object (3)
->value = Array (3)
 0 => Array (2)
   link => "index.php"
   label => "Home"
 1 => Array (2)
   link => "../hosting.php"
   label => "Hosting"
 2 => Array (2)
   link => "ssd-hosting.php"
   label => "SSD Hosting"
->nocache = false
->scope = "file:public_html/templates/..."

 

I'm just trying to optimize code for breadcrumb.tpl file. It's a stock SIX theme file but take note of how I added title="{$title}" to the <a>.

 

<ol class="breadcrumb">
   {foreach $breadcrumb as $item}
       <li{if $item@last} class="active"{/if}>
           <a href="{$item.link}" title="{$title}">
           <span>{$item.label}</span>
           </a>
       </li>
   {/foreach}
</ol>

Edited by USA_Webmaster
typo
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.

×
×
  • 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