Generator: Links List

Jul 11, 2006 02:46

Hey, all. I am using Generator, and up 'til now I've pretty much been able to get my layout to do what I want it to. Well, I want to add a links list to my journal, but it drives me no end of insane to have the links all in a row with no breaks. Ideally, I'd like to set up my links list so there's a line break in between each link, but if not that ( Read more... )

Leave a comment

Comments 3

Is this okay? ex_uniquewo July 11 2006, 11:50:45 UTC
Code for your Theme Layer:

function Page::print_linklist() {
if (size $.linklist <= 0) {
return;
}

println """

Links

""";

var bool section_open = false;
if (not $.linklist[0].is_heading) {
println """[ Links ]""";
$section_open = true;
}

foreach var UserLink l ($.linklist)
{
if ($l.title)
{
if ($l.is_heading)
{
if ($section_open)
{
println """""";
}
println """[ $l.title ]""";
$section_open = true;
}
else
{
println """ $l.title
""";
}
}

}

println """""";

"""

""";

}

Reply

Re: Is this okay? mmejavert July 11 2006, 22:07:30 UTC
Yes, that's exactly what I was looking for. Thank you so much!

Reply

Re: Is this okay? ex_uniquewo July 12 2006, 05:24:26 UTC
You're welcome :)

Reply


Leave a comment

Up