I have page 2 level
Example :
Home Level1
|
- Subcontent Level 2
- Subcontent Level 2
I want "Home Level 1" active link after I clicked "Subcontent Level 2"...
Now it active just menu "Subcontent Level 2".
Please help me. :)
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
I have page 2 level
Example :
Home Level1
|
- Subcontent Level 2
- Subcontent Level 2
I want "Home Level 1" active link after I clicked "Subcontent Level 2"...
Now it active just menu "Subcontent Level 2".
Please help me. :)
You can style your menus using the classes provided by the $LinkingMode template control (read the docs).
If you're using a theme, chances are high that the menu already uses the $LinkingMode class. All that is left to do in that case is to add the appropriate styles for .section
Thank you for reply. :)
Please see images below.
Yes, I understood that from your first post and I provided you with the solution as well.
When you're in "sub menu", the Overview menu-item most likely gets the section css class. All that is left to do for you is add the proper styles for .section in your css file.
:) Oh Cool it very easy. Thank you for your guide.
<div style="width:120px">
<ul>
<% control Menu(2) %>
<li id="menu">
<a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode<% if FirstLast %> $FirstLast<% end_if %>"><span>$MenuTitle.XML</span></a>
</li>
<% end_control %>
</ul>
</div>
Thank you Mr. banal very very so much.
I am new programming for SilverStripe :)
I love SilverStripe.