how to get current path in view?

8 views
Skip to first unread message

bryan rasmussen

unread,
Jul 27, 2014, 9:11:47 AM7/27/14
to compo...@googlegroups.com
Hi,

There's a bunch of code like the following in different views

<ul class="breadcrumb">
    <li><a href="/">Home</a> <span class="divider">/</span></li>
    <li class="active"><a href="<%- pathTo.categories() %>">categories</a> <span class="divider">/</span></li>
</ul>


What I want to do is to have something like the following



<ul class="breadcrumb">
    <li><a href="/">Home</a> <span class="divider">/</span></li>
    <li class="active"><a href="<%- currentPath() %>"><%= Path.base%></a> <span class="divider">/</span></li>
</ul>

without having to have that information in every controller.

Is there something like that already baked in, or if not how should I best do it?

Thanks,
Bryan Rasmussen

bryan rasmussen

unread,
Jul 27, 2014, 9:51:52 AM7/27/14
to compo...@googlegroups.com
ah I see the helperset exposes controllerName

thanks,
Bryan Rasmussen
Reply all
Reply to author
Forward
0 new messages