A common technique for indicating which section you are in within a site is to highlight the link used to get you there.
Something like
...
<div id="subnavcurrent">section 1</div>
<div id="subnav"><a href="sec2.htm">section 2</a></div>
<div id="subnav"><a href="sec3.htm">section 3</a></div>
<div id="subnav"><a href="sec4.htm">section 4</a></div>
...
sec2.htm has
<div id="subnav"><a href="sec1.htm">section 1</a></div>
<div id="subnavcurrent">section 2</div>
...
and so on.
This is part of a larger template. One way is to define N chunks containing the above extract where each has a different link set to the subnavcurrent id. How would I specify this within a template such that when creating a document I could enter the appropriate chunk. What is the MODx way of achieving this?
Ed
-
β A M B β
- 24,524 Posts
Most of the menu snippets do this automatically. Check the optional arguments listed in the beginning of the snippet code. Adjust your CSS file accordingly.
-
MODX Staff
- 12,272 Posts
And use Wayfinder if at all possible. Itβs infinitely easier to get the exact output you want.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me