<![CDATA[ YAMS & TV's - MODX Community Forums]]> https://forums.modx.com/thread/?thread=45617 <![CDATA[Re: YAMS &amp; TV's]]> https://forums.modx.com/thread/45617/yams-tv-s?page=3#dis-post-263897
I never thought of this workaround but it works well and fine for my needs...

Appreciated!]]>
bigSlim May 31, 2011, 10:27 AM https://forums.modx.com/thread/45617/yams-tv-s?page=3#dis-post-263897
<![CDATA[Re: YAMS &amp; TV's]]> https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263896
edited, sorry answered the wrong thread...

for your holiday cost tv in the template, the YAMS call should be
[[YAMS? &get=`tv` &from=`HolidayCost`]]


now when it comes to have it in chunks, the easiest way i’ve found out to do this is to do it the YAMS way in... YAMS call
i generally use two chunks myChunk_fr, myChunk_en for example in which it easy to output [+myTv_fr+] and [+myTv_en+] and use &tpl=`myChunk_(yams_id)` in YAMS call
so far, no issue with this way of working

now, when lazy smiley i may use only one chunk and, in this chunk, call a snippet to output the correct language tv content...
this is quite easy with a snippet as with
$yams   = YAMS::GetInstance();
$langId = $yams->GetCurrentLangId();

on top of it, you retreive the language currently used but this lazyness is paid by one more instance of YAMS even if fankly it does’nt seem to impact perfomance

hope it helps despite my "heavy English"
have swing]]>
virtualbear May 11, 2011, 03:45 AM https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263896
<![CDATA[Re: YAMS &amp; TV's]]> https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263895
If your template is only going to be used for a few documents, then, if possible, you could try including the Ditto calls within the multilingual content fields of those documents instead of the document template. It would appear from the YAMS documentation that that technique should work.

I’m not sure why you get a blank page when your Ditto call is made cacheable, although, if I remember correctly, the combination of whether or not the document and Ditto calls are cacheable is important with or without YAMS. Still, the blank page shouldn’t happen, but I’m unable to spare the time to investigate and I am no longer developing YAMS. If you want to look for clues to the source of the problem I’d check a) the cached content of the affected documents, b) your MODx event log and c) your PHP error log.

If you don’t have any luck with that and if no-one else is able to help them I am afraid that you’ll have to move on and try something else.]]>
PaulSuckling May 10, 2011, 12:32 PM https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263895
<![CDATA[Re: YAMS &amp; TV's]]> https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263894
Dont know whether to continue the investgations or quit and move on?

Appreciate any further help on this...

Thanks

bS]]>
bigSlim May 08, 2011, 12:56 PM https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263894
<![CDATA[Re: YAMS &amp; TV's]]> https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263893
By changing the Ditto call to being [[Ditto?...]] instead of [!Ditto?...!] has just caused the page to load blank??

Why would that be?]]>
bigSlim May 06, 2011, 08:11 AM https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263893
<![CDATA[Re: YAMS &amp; TV's]]> https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263892
[tt][[Ditto? &id=`(yams_id)` &language=`(yams_mname)` ...[/tt]]]>
PaulSuckling May 05, 2011, 04:36 PM https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263892
<![CDATA[Re: YAMS &amp; TV's]]> https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263891
If the snippet call is runnning as cacheable ([[Ditto? ...) then place once copy of the snippet call in each language tab of the document and add

&id=`id` &language=`language file name`

to each snippet call, where id is to be replaced by the language group id of the language and language file name is to be replaced with the name of the relevant language file. Also prefix the names any ditto specific placeholders with id_. For example, when using pagination it will be necessary to use [+id_start+].

When it mentions
place once copy of the snippet call in each language tab
what does that mean? Im not sure I follow? currently my Ditto call is placed inside the template that the page is using?

How do I get it into each tab?

bS]]>
bigSlim May 05, 2011, 03:45 PM https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263891
<![CDATA[Re: YAMS &amp; TV's]]> https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263890 PaulSuckling May 05, 2011, 03:32 PM https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263890 <![CDATA[Re: YAMS &amp; TV's]]> https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263889
I added in your suggested code but all I got out was the following on the page

((yams_data:249:HolidayCost_en))


249 is the document id and HolidayCost_en is obviously my multilingual tv.

Anything else that needs done to read this properly?

bS

]]>
bigSlim May 05, 2011, 03:06 PM https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263889
<![CDATA[Re: YAMS &amp; TV's]]> https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263888
[tt]((yams_data:[+id+]:HolidayCost_(yams_id)))[/tt]

The [+id+] should get parsed by Ditto first and then YAMS should parse the yams_data placeholder... maybe giving you what you want.
]]>
PaulSuckling May 05, 2011, 02:52 PM https://forums.modx.com/thread/45617/yams-tv-s?page=2#dis-post-263888