Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [rocco] GLinks 3: Extending Crumb Titles to Custom Templates: Edit Log

Here is the list of edits for this post
Re: [rocco] GLinks 3: Extending Crumb Titles to Custom Templates
$main_title_loop isn't a magic variable, it is passed in from the code, but isn't for your custom code. You need to create it yourself. The first argument to format_title (in this case $main_title_loop) should be an array of hashrefs with keys Name and URL (since most people don't link the last item, you can get away with just specifying Name).

So to generate the necessary structure that format_title is expecting you'll have to write a global like:
sub {
return [
{ Name => Links::language('LINKS_TOP'), URL => "$CFG->{build_root_url}/$CFG->{build_index}" },
{ Name => shift, URL => shift }
Then in the templates, do:
<%set main_title_loop = gen_title("Contact Page")%>

PS: pugdog's solution also works.


Last edited by:

brewt: Apr 16, 2005, 3:20 PM

Edit Log: