Graham
Waplocus I have altered the breadcrumbs script you posted with a counter to add a id parameter to the links
do you want that actual markup as the output
Waplocus
Graham Thanks sir, i'll d prefer the actual markup where all Links will be wrap by a <div class="RolWrap">then all inactive link will have RolCont1 id and the active/current link will be only 1 to have the RolCont2... i want the $button_class and $button_style remove e.t.c and also the home e.g i want something of this nature
<div class="RolWrap"> »
<a href="/Devices" id="RolCont1"> Devices </a>
» <a href="/Devices/Java" id="RolCont2"> Java </a>
</div>
Copy code ... Thanks.
Waplocus
Waplocus When it becomes a Root Folder .. e.g "/Devices", it does not take the "RolCont2" as the active path...
Waplocus
Waplocus Sir, the code i av in a file. i'm trying to xt inclue the file into a page but not working...
<xt:include file="<!--parser:xtscript-->
var $path= <xt:url type="path" />
var $lastslash = call strrpos $haystack=$path;$needle=/
var $trimmedpath = call substr $val=$path;$start=0;$length=$lastslash
print $trimmedpath/SOX/HeadTag
<!--/parser:xtscript-->" />
Copy code
Waplocus
Graham Please sir how can i print the path name before(folder name) the index e.g in "/Education/index" print "Education" e.g in /Education/JAMB/index print "JAMB"
<<!--parser:xtscript-->
var $spc=call chr $val=32
var $path=<xt:url type="path">
var $pos = call strrpos $haystack=$path; $needle=/
var $path = call substr $val=$path; $start=0;$length=$pos
var $pos = call strrpos $haystack=$path; $needle=/
var $name = call substr $val=$path; $start=($pos+1)
var $name = call str_replace $subject=$name; $search=_ ; $replace=$spc
print $name
<!--/parser:xtscript-->
Copy code ...THANKS.
Graham
Waplocus 1/ looking at it
2/ includes are done before xtscript so it won't work
3/ if this is just so you can mark it for css don't bother with id use last-of-type
.RolWrap a:last-of-type {
background: #ff0000;
}
Copy code id is meant to be unique to that element anyway using the same id more than once on a page can cause issues