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

Re: [rocco] GLinks 3: Extending Crumb Titles to Custom Templates

Quote Reply
Re: [rocco] GLinks 3: Extending Crumb Titles to Custom Templates In reply to
If your custom page is being generated by a script that doesn't provide that tag, you'll have to enter the code to create that variable.

Code:
$results->{main_title_loop} = Links::Build::build('title', Links::language('LINKS_ADD_SUCCESS'), "$CFG->{db_cgi_url}/add.cgi");

and you'd return or pass $results (or %$results).

or
Code:
my $mtl = Links::Build::build('title', Links::language('LINKS_ADD_SUCCESS'), "$CFG->{db_cgi_url}/add.cgi");

and in the Site::HTML::build or return () functions, you would assign {...., main_title_loop => $mtl, ...}


Pretty much you need to return a tag "main_title_loop" that is "built" from the above sort of function call.

That tag is then sent through the html-based function call you printed.

Basically, you call Links::Build::build's "title" function, with the text-string you want, and an optional override-URL for the _last_ item to link to it, if the second paramter is not a category name. It returns an array of hashrefs [{Name => url}, {Name => url}..]

This is what is "breadcrumbed" by the routine in the template.

It's kind of cool, but you need to tell it what you want to end up bread crumbed, it's not automatic.

It sets the Home> or whatever your defined value is, as the first parameter, so passing in

Links::language('LINKS_ADD_SUCCESS')

would return:

Home > Sucessfully Added

Depending on what you had set for your language code.




PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Subject Author Views Date
Thread GLinks 3: Extending Crumb Titles to Custom Templates rocco 1712 Apr 16, 2005, 8:39 AM
Thread Re: [rocco] GLinks 3: Extending Crumb Titles to Custom Templates
brewt 1665 Apr 16, 2005, 2:51 PM
Post Re: [brewt] GLinks 3: Extending Crumb Titles to Custom Templates
rocco 1649 Apr 16, 2005, 3:52 PM
Thread Re: [rocco] GLinks 3: Extending Crumb Titles to Custom Templates
pugdog 1654 Apr 16, 2005, 3:02 PM
Post Re: [pugdog] GLinks 3: Extending Crumb Titles to Custom Templates
rocco 1650 Apr 16, 2005, 4:28 PM