In my site navigation I normally use %asset_short_name% to output the page name, and that gives me these results:
live page - name shows
under construction page - ((name shows in brackets))
archive page - name doesn't show
But, I have a site with one section that has to be in 2 contexts (bilingual for our friends in Wales). If I use %asset_short_name% then the page names don't switch to the right context. So I've used %asset_attribute_name%, which results in the right name for the right context being shown.
But I get these results:
live page - name shows
under construction page - name shows as normal if I'm logged in
archive page - name shows as normal if I'm logged in
Its not a huge problem, as obviously the public don't see under construction or archive page links, but all my editors do, and its a lot easier to have the ((name)) for under construction pages, or they do tend to panic that its live.
So is there a way to show the right page name for the right context, but also to have the handy ((brackets)) back again?
Could you maybe print the status of the asset as well? And do some keyword modification on it? So for example, %asset_status_description^contains:Under Construction:((:% and again for the closing brackets, %asset_status_description^contains:Under Construction:)):%
Makes for an ugly keyword, but would do what you want if I understand the problem correctly.
However, just need to clarify that, in my test system and in the code, i can see that archive page should be wrapped with (( )) if you are using a sysadmin user (or root user),
and it won't show up for regular editor user.
This behavior is consistent either using %asset_name% or %asset_attribute_name%. It shouldn't have anything to do with keywords actually.
The permission check is done before keyword is replaced.