Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Cool Links on home page??

Quote Reply
Cool Links on home page??
 
Is it possible to include "Cool Links" in the home.html page? I tried and got a tag error, and the GT tag dump for that page doesn't give me any insight as to how I might do this. Is it possible?? Unless somebody has another idea, I guess I'll try an inline frame include.


Thanks

Rich
Quote Reply
Re: [richonmaui] Cool Links on home page?? In reply to
You could create a global that does something similar to what's in Links::Build::build_cool.

Adrian
Quote Reply
Re: [brewt] Cool Links on home page?? In reply to
In Reply To:
You could create a global that does something similar to what's in Links::Build::build_cool.
Could you give me just a couple clues as to how I do that?? Is "Links::Build::build_cool" in the cool.html page, or where? How might the global read?

Thanks much

Rich
Quote Reply
Re: [richonmaui] Cool Links on home page?? In reply to
Links::Build::build_cool is used to generate the tags that's used in cool.html. You probably won't need all the code that's in there, so just copy out what you need and put it into a global. I would make it just return a loop of links (ie. what link_results_loop is), and then you can just loop through it in the template.

So in the template, it'd be something like:
Code:
<%my_cool_global(5)%>
<%loop cool_links%>
<%-- do stuff with links --%>
<%endloop%>

where 5 could be how many cool links you wanted.
And the global would be something like:
Code:
my $count = shift;

# build_cool code

return { cool_links => \@cool_links_loop };

Adrian