Hi all,
Working on a site at the moment with the following structure:
Home Country
-- Program
---- Destination Country
So, when people visit the homepage, they select their home country, for example, 'United Kingdom'. They then get into the section where they can see all the different programs. On this page, we're pulling in a template variable from the 'Home Country' which is the little flag of that country so it displays in the menu bar at the top. This helps the user see which country they're in so they know straight away that their home country is correct.
However, if the user then clicks into a destination country, the flag in the top menu cannot be found, as it's looking for a template variable in the program page. I don't really want to have to duplicate the TV as it's more work for the client when they add new countries. So I just wondered if there was a way to pull in the top level countries TV? I could either do it in a chunk with a piece of code, or via the wayfinder, whichever is easiest, but I'm struggling to figure it out!
Any help would be great!
Kind regards,
Lewis
Quote from: pmfx at Mar 30, 2013, 12:53 PMMy example was for Evolution 
and
$modx--->getTemplateVarOutput(
should be
$modx->getTemplateVarOutput(
;)
BobRay, I have no idea how those additional two "-" got there.
Thanks for pointing it out.
-
☆ A M B ☆
- 894 Posts
You can use
getResourceField extra for this instead of creating something custom and try to reinvent the wheel.
Good Luck.