I'm trying to make a side menu that knows the parent category of the page being viewed. What I currently have is a mixture of Paint Layouts, Asset Listings, Category Folders and News Items to create something similar to a 'Blog'.
A combination of the Paint Layout and Asset Listing is what makes up the screen content when viewing a News Item. Currently I am able to retrieve the name of the News Item asset by using the $asset_name% keyword replacement in the paint layout that generates the News Item's contents.
Each of the News Items are created within a folder asset which acts as a category. What I want to do with the menu (using the EasyTree Menu js) is have Squiz tell me what the parent category is of the News Item currently being viewed - store this as a variable that is passed to the EasyTree menu js at runtime so that it will have all category folders contracted except for the category that the current item being viewed is within. Pretty much making it a smart menu.
My issue is that I cannot get the asset's parent name. It would seem I can only use the %parent_name% keyword on a Group Format Bodycopy http://manuals.matrix.squizsuite.net/keyword-replacements/chapters/asset-listing
Seeing as though I am using this Keyword Replacement on a Paint Layout bodycopy, I just don't know how to get the name of the parent folder. Is there a possible way to do this? The closest thing I could find is to get the %asset_lineage% and then using .replace() method to cut out the unecessary text in the string, sounds messy when I come to think of it.
Hopefully there is a better way??