On 3/6/2011 5:28 AM, Andrew Rodland andrew-at-cleverdomain.org |Catalyst/Allow to home|
wrote:
Or, since you know that what it generates *doesn't* have a fragment you could
always just $c->uri_for_action(...) . '#id' which will be perfectly valid
(although no longer a URI object).
I considered that a hack until I knew better, since it won't work if there are query
arguments.
This worked:
[% IF c.action != 'index' ;
SET toplink = c.uri_for_action('/index') ;
CALL toplink.fragment('galleries') %]
<li><a href="[%toplink%]">Gallery Index</a></li>
[% END %]
though I'd certainly be interested in hearing how I could do it better.
--John
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/