$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:
return [
{ Name => Links::language('LINKS_TOP'), URL => "$CFG->{build_root_url}/$CFG->{build_index}" },
{ Name => shift, URL => shift }
];
}Then in the templates, do:
PS: pugdog's solution also works.
Adrian
So to generate the necessary structure that format_title is expecting you'll have to write a global like:
Code:
sub { return [
{ Name => Links::language('LINKS_TOP'), URL => "$CFG->{build_root_url}/$CFG->{build_index}" },
{ Name => shift, URL => shift }
];
}
Code:
<%set main_title_loop = gen_title("Contact Page")%>PS: pugdog's solution also works.
Adrian