Globals_asset_ or asset_ keywords in design for site index


(Chris Horikx) #1

Hi Guys,

 

I'm using some globals_asset keywords in my design on a 5.4.1 system. I need to access metadata of the current page for some modifier logic on each page. This works for every page, apart from the site URL. The globals_asset keywords accesses data from the site asset instead of the index asset as specified in "Special page links". So %globals_asset_name% would be "site name" on www.site.com/ but "Home" on www.site.com/home.

 

Is this working as expected and if so, is there anyway to access only the page asset data? It was a bit surprising for me because everything else on the site URL usually mirrors that on the /home (index) URL. I could imagine it might be a bit hacky to make it different just for the index page.

 

Chris


(Tim Davison) #2

I've encountered this dichotomy before.  Usually I've had to create a separate design customisation specifically for the homepage.  The Matrix cache will see the site and the home asset as different assets.  Another way I've done it is with spme logic within modifiers on the keyword, but that is very case specific.


(Bart Banda) #3

Yea I think the globals keywords mostly just access stuff from the current asset being viewed, top asset. And because you are on the site asset, it gets data from that. It might also depend on where you print it.

 

If you are printing it in the parse file, have you tried just using %asset_name% to see what that prints? Or use a design area print tag instead?