[+content:limit=`300`+]
(yams-select:140)(lang:140:en) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ullamcorper semper augue, vitae feugiat massa tristique laoreet. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam non erat nulla, vitae volutpat e
EDIT: And I just discovered that pagination in Ditto is not working, it always get’s back to the default language when you click on the link to go to the next page with results.
I did set it up like is told in the documentation of YAMS and it create links like this:
For the default language: http://fake.url/artists.html?yams_lang=en&artists_nl_start=3&artists_en_start=0
and for the dutch language: http://fake.url/artists.html?yams_lang=nl&artists_nl_start=3
The one for the default language is working, the one for the dutch language is redirecting to the English pages
Hi @MediaGuy
YAMS needs to appear first in the plugin execution order on all events to which it is associated. It will parse all YAMS placeholders and constructs and tidy up any ones it is not able to parse to make the document look ’clean’ before other plugins like PHx do their work or any snippet calls are evaluated by MODx etc.
The most likely problem is that your plugin execution order is not right, so that your PHx command is truncating a YAMS construct.
Please try placing YAMS first in the execution order and let me know if that doesn’t work.
Thanks.
EDIT: And I just discovered that pagination in Ditto is not working, it always get’s back to the default language when you click on the link to go to the next page with results.
I did set it up like is told in the documentation of YAMS and it create links like this:
For the default language: http://fake.url/artists.html?yams_lang=en&artists_nl_start=3&artists_en_start=0
and for the dutch language: http://fake.url/artists.html?yams_lang=nl&artists_nl_start=3
The one for the default language is working, the one for the dutch language is redirecting to the English pages
It works like this: The Ditto pagination extension doesn’t know about YAMS, so it creates standard/monolingual URLs. YAMS will redirect from standard URLs to a multilingual language variant of the URL based on the redirection mode you have set up (See Other Params tab.) You have probably got it set to ’Default’ - which means always redirect to the default language. Try changing it to ’current’. Then the link will display in the same language as the last multilingual page accessed. Then all should be fine. If that works for you, I’ll update the documentation.
Aside By the way, I have been thinking about it, and I might be able to get rid of or at least greatly reduce all those restrictions on URLs being unique and whether or not server and root names are specified etc. In future you might be able to just do whatever you like, which would be much more friendly. I’ve only got this working in a fluffy way in my head, not on paper or code yet. Watch this space.
I have used YAMS with Jot, which uses PHx extensively and not had problems, so this must be a special case I have not picked up on yet. It’s clear that the problem is with truncation of the content document variable that has been replaced by a YAMS multilingual construct. This must mean that PHx is getting to the content before YAMS, or YAMS is not tidying up properly. The only way for me to fix this is to set up a test case and debug it. I know of another issue that is likely to be related that means that it is not possible to put YAMS placeholders in the parameters of cacheable snippet calls. I have been intending to get around to fixing that for a while. Perhaps I can kill two birds with one stone here. Give me a few days, I’ll see what I can do with regards to fixing this.
Quote from: PMS at Aug 20, 2009, 03:13 AMI already did that, so that is not the problem. I’m not sure what is causing the trouble, I also use phx:phpthumb to resize image... that one is working good. But on the other side are images not multilingual.
Please try placing YAMS first in the execution order and let me know if that doesn’t work.
Quote from: MediaGuy at Aug 20, 2009, 04:00 AMI have used YAMS with Jot, which uses PHx extensively and not had problems, so this must be a special case I have not picked up on yet. It’s clear that the problem is with truncation of the content document variable that has been replaced by a YAMS multilingual construct. This must mean that PHx is getting to the content before YAMS, or YAMS is not tidying up properly. The only way for me to fix this is to set up a test case and debug it. I know of another issue that is likely to be related that means that it is not possible to put YAMS placeholders in the parameters of cacheable snippet calls. I have been intending to get around to fixing that for a while. Perhaps I can kill two birds with one stone here. Give me a few days, I’ll see what I can do with regards to fixing this.
Quote from: PMS at Aug 20, 2009, 03:13 AMI already did that, so that is not the problem. I’m not sure what is causing the trouble, I also use phx:phpthumb to resize image... that one is working good. But on the other side are images not multilingual.
Please try placing YAMS first in the execution order and let me know if that doesn’t work.
It shouldn’t just work. To use pagination with ditto you have to call it using an uncacheable snippet call. Otherwise the first page gets cached and displayed every time. It is a general rule that snippets that can output different content on different page loads need to be called as uncahceable [!...!]. EDIT: Alternatively the document as a whole must be set to uncacheable.
EDIT: Just re-read your post. You say "the pagination placeholders don’t work if I call it uncached". Confused. The ditto call needs to be uncached for the placeholders to work. At least, that’s what I expected and found when I tested pagination with YAMS before. If you continue to have problems I’ll look into it again.
If the document is uncacheable, then the ditto call wont be cached, no matter whether it is specified with [! or [[. I can’t imagine why it wont work with both document and snippet call specified as uncacheable though. You’re right - it should still work.
Well, The document itself is uncacheable, but the Ditto call is cached and works! If I make the Ditto call uncached it stops working. Very strange, I don’t know what is causing this... normally it should not work this way!!