Hello,
This is not actually TT question, but maybe there's a good way to solve
this in TT. Let's assume i have following hash:
header_data => [
{ image_on => 'adm_menyp.gif',
image_off => 'adm_menyp.gif',
image_alt => '[ menu ]',
name => 'menu',
href => 'menu.html',
links => [
{ href => 'link1.html', nimi => 'Link 1 name' },
{ href => 'link2.html', nimi => 'Link 2 name' },
]
},
]
Ok, now i want to generate my page's header from this, basically
just href is main category and links.href's are sub-categories.
Problem is that if my link looks like http://myserv.org/link1.html
(subcategory), then i don't know under which category it belongs to :(.
Now is there a simple way to find it out? Yeah, i could loop through
header_date and see which links.href matches, but i don't like it. Is
there something like 'parent' or whatever (like in JavaScript) in TT, or
better, in perl?
Rgds,
Viljo