![]() |
breadcrumb code
can anyone explain how
Code:
{* $Id: location.tpl,v 1.14.2.2 2007/06/18 11:42:03 max Exp $ *} produces: Code:
<font class="NavigationPath"> |
Re: breadcrumb code
By asking if $location is true, then open a deprecated FONT element with thea class of NaviagtionPath, then {strip} all the white space in the following $location loop then close the deprecated FONT element then add two line break elements, then close the conditional $location question/logic. Is this what you meant?
|
Re: breadcrumb code
I can see very clearly what you have said.
I do not understand this : Code:
{section name=position loop=$location} |
Re: breadcrumb code
well, that's all the fun stuff there!
{section} starts the loop and it's named position and it's trying to figure out where the user's location is in the application. if the $location[position].1 is not where you're at, then it starts an anchor. Otherwise, it's just text, {$location[position].0}. Then it does that logic again to see if it needs to close the anchor. There's also another post here where they talk more about how to modify this bit of code. How well did this answer your question? |
Re: breadcrumb code
Your answers are extremely enlightening! Thanks a lot.
$location is an array of of location strings? {section name=position loop=$location} What is the purpose of section in smarty? loop = $location means to read through elements of the array $location? this loop is sort of like a built in function to obtain the length of the location variable? {if $location[position].1 ne "" }<a href="{$location[position].1|amp}" class="NavigationPath">{/if} if $location[position].1 ne "" mean if not equal to NULL, then print the location variable position with the anchor html code. what does the .1 mean in $location[position].1 ? what does the |amp mean in $location[position].1|amp ? {$location[position].0} -now what does the .0 mean ? {if $location[position].1 ne "" }</a>{/if} {if not %position.last%} > {/if} {/section} i do not understand %position.last% , the % character meaning here. |
All times are GMT -8. The time now is 10:57 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.