Forum
perch_pages_navigation for multilingual
I am running a multilingual site using a region for each language (strategy two).
I have second level subpages, and I would like to display page navigation on both languages. Actually is only displaying Navigation text on page details. How can I make perch_pages_navigation
gives me actual language?
Where is the string you want to output stored, and how and you attempting to use it?
Main page everthing OK: url:
Innovation/index.php
regions:Innovation-en
/Innovation-es
Subpages: - url:
innovation/bim.php
(regions:BIM-en
/BIM-es
) - url:innovation/green-concience.php
(regions:Green-Concience-en
/Green-Concience-es
) - url:innovation/energy-efficiency.php
(regions:Energy-Efficiency-en
/Energy-Efficiency-es
)it uses
perch_pages_navigation
to display navigation between subpages, working ok with main language (english)**I would like to display navigation lists on spanish when `$lang = 'es'`` **
Navigation item template:
Maybe using some other tag instead of
<perch:pages id="pageNavText" />
will take region depending on language?Yes, add the translated title as a page attribute. You can display those in navigation templates.
I don't get how to do that Drew...
Should I replace
<perch:pages id="pageNavText" />
for<perch:content type="text" id="subpage_heading" label="Subpage Heading" title="true" required="true" />
from subpage template?If I could have two fields for
Navigation Text
on page details, one for each language, I could pass$lang
variable and make something like this on item.html...?hmmm... no idea
Yes, that's the general idea.
But how I could create a second navigation text input? In witch template should I create it?
If you enable debug you can see which templates are currently being used.
Looking at debug, it takes me to
perch/templates/pages/attributes/default.hmtl
. I can seedescription
,keywords
and somecheckboxes
, but there is nonavigation text
... Could you help me Rachel?Have you added the new field you want? It won't be there until you add it.
I've finally make a raw navigation... thanks anyway, this aspect is not so clear...
It's really not as complicated as you're making it.