This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Suppose you have a custom content type called 'videos' | |
You have a menu item that points to the 'videos' archive page (http://yoursite.com/videos) | |
When on a single video page you want the 'videos' menu item to be styled as the current/active link | |
The following will make the Timber\MenuItem 'current' property to true on the archives menu item when on a single post | |
*/ |