<![CDATA[ [Wayfinder+YAMS] Yams and weblinks - MODX Community Forums]]> https://forums.modx.com/thread/?thread=45460 <![CDATA[Re: [Wayfinder+YAMS] Yams and weblinks]]> https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-430244
It probably is already handeld elsewhere? I just ran into it today while discovering yams. I use 1.2.0rc3 and Evo 1.0.6

Cheers.
]]>
IngMA Jul 17, 2012, 10:00 AM https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-430244
<![CDATA[Re: [Wayfinder+YAMS] Yams and weblinks]]> https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-428413
After a lot of time looking for a solution, because yams does not recognize weblink in my main menu, i make a trick that works perfect for me:

1. to the weblink page, assign the template that yams is using to apply different tabs languages, and fill the information most important the info for the menu (menutitle (en) - menutitle (es) - menutitle (fr) etc...) save it.

2. just change the template for a template that is not assigned to yams (ej: jminimal template) and that is all, because Yams still reading the information on the menutitle page, and display the weblink in different languages, but because we change the template, yams is not interrumping the weblink function.

i hoe that works for you too...

have a grat day aveyone! laugh]]>
Ysanmiguel Jun 30, 2012, 12:37 PM https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-428413
<![CDATA[Re: [Wayfinder+YAMS] Yams and weblinks]]> https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-263050 Quote from: PMS at Nov 19, 2009, 11:26 PM

Ah ha...

First make sure that the RTE setting is set to off for the document. Save it to apply the change if necessary. Then...

If you want your weblink to point to a MODx document, then type the id of the document you want to link to into each of the multilingual content fields.

If you want your weblink to point to an external webpage, then type the address of that webpage into each of the multilingual content fields.

That should be it.

Thats works for me - thanks a lot]]>
pitek Sep 20, 2010, 07:22 AM https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-263050
<![CDATA[Re: [Wayfinder+YAMS] Yams and weblinks]]> https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-263049
When you have a monolingual weblink associated with for example no template at all (blank), you find that the YAMS-Wayfinder combo as described above is not really picking up the stuff correctly. I still suspect this goes down to what I describe in my post referred to above.

If you then associate the weblink with a mutilingual template, the corresponding template variables are associated and prepared for the weblink as well (as PMS describes above). Now, if you put your menu text into the language-specific fields for the menu, YAMS-Wayfinder will show this correctly. Now, if you disassociate your weblink with the multilingual template back to for example the blank (monolingual) template, the multilingual fields of course are not shown anymore. However, their content still lives somewhere and then template variables are still picked-up by YAMS.

That’s why in my old setup I thought it was working: I had some hidden multilingual template variables that still carried the correct content in the menu field so that the menu entry appeared correctly. However, in MODx the weblink appeared as monolingual again.

So the workaround here is to associate weblinks with multilingual templates as well and if for any reason you need them to be monolingual, by all means fill in the multilingual menu fields and then change the template back. Nasty, I know, but it seems to work at least.

I feel this is something to be patched in YAMS. PMS, what do you think?]]>
kongo09 Aug 02, 2010, 08:31 AM https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-263049
<![CDATA[Re: [Wayfinder+YAMS] Yams and weblinks]]> https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-263048 http://modxcms.com/forums/index.php/topic,44070.0.html]]> kongo09 Aug 02, 2010, 08:15 AM https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-263048 <![CDATA[Re: [Wayfinder+YAMS] Yams and weblinks]]> https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-263047 http://modxcms.com/forums/index.php/topic,51062.0.html]]> kongo09 Aug 02, 2010, 07:33 AM https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-263047 <![CDATA[Re: [Wayfinder+YAMS] Yams and weblinks]]> https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-263046
I’ve just come across the same problem.

In the past, I used MODx 1.0.2 with a slightly customized version of YAMS (but that’s a different story). Wayfinder was properly resolving a monolingual weblink no matter what language the page was in that contained the Wayfinder call.

Now I’m in the process to migrate to MODx 1.0.4 and also to the latest YAMS (again with my small customizations). Now, I observe the behaviour described above. The link is not resolved anymore by Wayfinder. More specifically, the generated HTML shows the link, but lacks the text inside the <a> tag so the menu entry appears empty. Only if I change the template to a multilingual template, the Wayfinder call works as expected.

Now I’m investigating if this is a bug in Wayfinder, in YAMS, in the YAMS-Wayfinder templates (I’m using the docr version) or in my personal YAMS customization. Point is: you’re not alone and I’ll try to solve this.]]>
kongo09 Aug 02, 2010, 07:28 AM https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks?page=2#dis-post-263046
<![CDATA[Re: [Wayfinder+YAMS] Yams and weblinks]]> https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks#dis-post-263045
I have since had a chance to re-think my approach to this particular project, and managed to do away with the need for weblinks altogether.

Still I’m sure your solution would come in handy one of these days wink Thanks again.


Regards,
Les@ITworks]]>
higgins Jul 25, 2010, 02:53 AM https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks#dis-post-263045
<![CDATA[Re: [Wayfinder+YAMS] Yams and weblinks]]> https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks#dis-post-263044 http://example.com/fr/pagename.

YAMSFirstChildRedirect:
<?php
/*
 * @name FirstChildRedirect
 * @author Jason Coward <jason@opengeek.com>
 * @modified-by Ryan Thrash <ryan@vertexworks.com>
 * @license Public Domain
 * @version 1.0
 * 
 * This snippet redirects to the first child document of a folder in which this
 * snippet is included within the content (e.g. [!FirstChildRedirect!]).  This
 * allows MODx folders to emulate the behavior of real folders since MODx
 * usually treats folders as actual documents with their own content.
 * 
 * Modified to make Doc ID a required parameter... now defaults to the current 
 * Page/Folder you call the snippet from.
 *
 * Modified to work with YAMS
 * 
 * &docid=`12` 
 * Use the docid parameter to have this snippet redirect to the
 * first child document of the specified document.
 */

$docid = (isset($docid))? $docid: $modx->documentIdentifier;

$children= $modx->getActiveChildren($docid, 'menuindex', 'ASC');
if (!$children === false) {
    $firstChild= $children[0];
    $firstChildUrl= $modx->makeUrl($firstChild['id']);
} else {
    $firstChildUrl= $modx->makeUrl($modx->config['site_start']);
}
$lang = $modx->runSnippet('CurrentLanguage');
return $modx->sendRedirect('/'.$lang.$firstChildUrl);
?>


You’ll also need this snippet called CurrentLanguage:
<?php
require_once( $modx->config['base_path'] . 'assets/modules/yams/class/yams.class.inc.php' );
// Get an instance of the yams class
/* @var $yams YAMS */
$yams = YAMS::GetInstance();
if ($yams->IsMultilingualDocument($modx->documentIdentifier)) { 
  $lang = $yams->GetCurrentLangId();
} else {
    $lang = 'en';
}
return $lang;
?>
]]>
pbowyer Jul 24, 2010, 04:04 PM https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks#dis-post-263044
<![CDATA[Re: [Wayfinder+YAMS] Yams and weblinks]]> https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks#dis-post-263043
Hi there. I was just wondering whether you’ve managed to resolve the weblink issue you described above and, if so, how?
I am having the exact same problem myself, have also followed PM’s instructions to the letter, but still get redirected to the home page once I change language.

Thanks.

Regards,
Les@ITworks]]>
higgins Jul 24, 2010, 05:30 AM https://forums.modx.com/thread/45460/wayfinder-yams-yams-and-weblinks#dis-post-263043