Hi all,
First, please be kind, I’m just new to ModX and to this forum so apologies if I make any social faux pas, such as perhaps posting this in the wrong forum or not finding the result I want through a search or FAQ (I did look, honest!)
I’m wanting a few pointers on how to apply a particular pattern to some pages I’m working on.
Here’s the deal. I have a page, it has a title and body content and a graphic. But I want this page to be in two different languages (Swedish and English). One method I was considering is having a template that requires two titles (Swedish + English), two blocks of content (Swedish and English), and the graphic. This way all content could be handled from the same page and what language is displayed would depend on a querystring variable or a session variable. But of course, the concept of having two Titles in ModX certainly isn’t supported out of the box - what would the navigation menu generators, etc use? Would I have to build in the language variable into them? etc.. Difficult.
So instead I feel I need to mirror the entire navigational structure and have two pages, one English, one Swedish. But what now is in question is how it can handle the graphic - it’s always going to be the same regardless of language. How can I construct it so that if the image is changed on one page (English) it’s updated on the other (Swedish)?
Any suggestions on approaches?
Much thanks,
Tom.
-
☆ A M B ☆
- 24,524 Posts
YAMS is very good. I’ve just begun to work with it, but it’s very logical once you dig into it.
Basically how YAMS works is that there is one resource for all languages; you use TVs instead of the content field and the other usual resource fields like pagetitle, one set of TVs for each language. It uses ManagerManager to put all the TVs for a given language it its own tab. But the resource can also have "global" TVs, like an image tv; it’s controlled by the name of the TV.
If you prefer to go with the different branch of the resource tree for each language, you can use a TV for the image, but the TV for each language’s resource would use something like @RESOURCE, indicating a "utility" resource that would only be used to manage the image.
You could also use a chunk; it would be easiest using the rich text editor to edit the chunk so you can use its image insert menu item.
This is MODx

. I’m sure others can think of other ways to handle this situation.
Hi Susan,
Thanks for that - YAMS does looks very good, exactly what I’m looking for. It appears to be for Evolution which I haven’t tried yet (have been learning Revolution only thus far), but YAMS seems to give me the motivation I need to try it out.
Chunks look good too, but would mean treating the image as a separate resource, I’m hoping to keep all resources for the same page on the same page.
Thanks for your help!
Tom.