YAMS Language Select Landing Page
This is a user-contributed Extra. If you find issues or would like more info or help, please contact the author.
Unknown macro: {div}
Language Variants
No content found for label(s) yams-language-select-landing-page. |
How can I make a language selection site start/landing page?
- Create a new template to use for the landing page.
- From within the YAMS Module, select that template as monolingual or multilingual as required. (If the landing page is multilingual then YAMS can be set-up to guess the language to display based on the user's browser settings. See the Other Params tab.)
- Modify the MODx site start document to use the landing page template
- Create a chunk containing the following template called LandingPageRepeat, say:
<li><a href="(yams_docr:docId)" title="[[YAMS? &get=`data` &from=`pagetitle` &docid=`docId`]]" >(yams_name)</a></li>
Replace docId by the identifier of the document that the user will to be redirected to from the landing page.
- Somewhere in the template, use the following code to include a hyperlinked list of all available languages:
<ul>[[YAMS? &get=`repeat` &repeattpl=`LandingPageRepeat`]]</ul>
Suggest an edit to this page on GitHub (Requires GitHub account. Opens a new window/tab).