So, I turned to the YAMS docs and see I am supposed to add this to all Wayfinder calls:
&rowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/mode/row.tpl` &parentRowHereTpl=`@FILE:assets/modules/yams/tpl/wayfinder/mode/parentrowhere.tpl` &parentRowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/mode/parentrow.tpl` &hereTpl=`@FILE:assets/modules/yams/tpl/wayfinder/mode/here.tpl` &innerRowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/mode/innerrow.tpl` &innerHereTpl=`@FILE:assets/modules/yams/tpl/wayfinder/mode/innerhere.tpl` &activeParentRowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/mode/activeparentrow.tpl` &categoryFoldersTpl=`@FILE:assets/modules/yams/tpl/wayfinder/mode/categoryfolders.tpl` &startItemTpl=`@FILE:assets/modules/yams/tpl/wayfinder/mode/startitem.tpl`
Do I really need all that? I only use &rowTpl in my calls. I guess I have to customize your &rowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/mode/row.tpl so that it matches my own rowTpl.
Well spotted. It’s a bug in the server config output by YAMS. I have fixed it. The fix will appear in a bug fix release coming very soon. (Today or tomorrow probably.)
I see that in YAMS-Configuration-Server Config use rules with symbol $ :
RewriteCond ${REQUEST_FILENAME} !-f RewriteCond ${REQUEST_FILENAME} !-d
But it’s not work. I fix it - changed to %:
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
And another question.
[[YAMS? &get=`text` &from=`ru::от "первого "лица"`]]
In example page show only - ’от "первого ’. I think YAMS don’t recognize entity.
[[YAMS? &get=`chunk` &from=`mytext`]]
<!--[!Wayfinder?&startId=`0`&includeDocs=`1,4,5,6,7,8,9,10`&rowTpl=`menuTpl`!]--> [!Wayfinder?&startId=`0`&includeDocs=`1,4,5,6,7,8,9,10`&rowTpl=`menuTplYAMS` &parentRowHereTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/parentrowhere.tpl` &parentRowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/parentrow.tpl` &hereTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/here.tpl` &innerRowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/innerrow.tpl` &innerHereTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/innerhere.tpl` &activeParentRowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/activeparentrow.tpl` &categoryFoldersTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/categoryfolders.tpl` &startItemTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/startitem.tpl`!]
<li [+wf.classes+]><a id="menu[+wf.docid+]" href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a></li>
<li [+wf.classes+]><a id="menu[+wf.docid+]" href="(yams_doc:[+wf.docid+])" title="[[YAMS? &get=`content` &docid=`[+wf.docid+]` &from=`pagetitle`]]">[[YAMS? &get=`content` &docid=`[+wf.docid+]` &from=`pagetitle`]]</a></li>
<li class="active"> <span></span> </li>
I honestly don’t know. This code is being generated using the hereTpl or the innerHereTpl - but I have checked the YAMS templates and they look fine - and your snippet parameters look fine too - so I am stumped for the moment. I have also never had this problem before. Is there any other reason why there would be no content for the active documents? Could the menutitle be empty (this is what the YAMS template puts in the span by default), or is the document unpublished or something like that?
Everything seems to work ok except the active menu element. It always is output like this:
<li class="active"> <span></span> </li>
What do you think could be causing this?
Quote from: towerofbabel at Aug 23, 2009, 02:52 PMI honestly don’t know. This code is being generated using the hereTpl or the innerHereTpl - but I have checked the YAMS templates and they look fine - and your snippet parameters look fine too - so I am stumped for the moment. I have also never had this problem before. Is there any other reason why there would be no content for the active documents? Could the menutitle be empty (this is what the YAMS template puts in the span by default), or is the document unpublished or something like that?
Everything seems to work ok except the active menu element. It always is output like this:
<li class="active"> <span></span> </li>
What do you think could be causing this?
Well, I can see that the Yamsified bit of the active template is working fine. The <span>...</span> is getting filled in correctly. However, nothing is being output for the standard Wayfinder placeholder, [+wf.wrapper+], with which YAMS does not interfere. I don’t know why that is. Are you really expecting a sub-list of documents to appear here? Could it be that your fairly restrictive list of docs
You can see the main menu here:
http://www.quitsmokingin10days.com/product
http://www.quitsmokingin10days.com/blog
and note that when each page given above is not active, the nav item for it still works.
I am stumped here. Obviously this works with my pre-YAMS Wayfinder call.
&includeDocs=`1,4,5,6,7,8,9,10`
Well, I can see that the Yamsified bit of the active template is working fine. The <span>...</span> is getting filled in correctly. However, nothing is being output for the standard Wayfinder placeholder, [+wf.wrapper+], with which YAMS does not interfere. I don’t know why that is. Are you really expecting a sub-list of documents to appear here? Could it be that your fairly restrictive list of docsis excluding the ones you expect to appear there or something like that?&includeDocs=`1,4,5,6,7,8,9,10`
...
EDIT: Were you expecting a link instead of a span to be displayed for the active document by the way - or is it simply that you were expecting a sub-list of documents?
<div id="menu" class="dark"> <!--<ul><li ><a id="menu1" href="http://www.quitsmokingin10days.com/" title="Home">Home</a></li> <li ><a id="menu4" href="/product" title="Product">Product</a></li> <li class="active"><a id="menu5" href="/blog" title="Quit Smoking Blog">iQuit Blog</a></li> <li ><a id="menu6" href="/about" title="About">About</a></li> <li ><a id="menu7" href="/contact" title="Contact">Contact</a></li> <li ><a id="menu8" href="/faq" title="FAQ">FAQ</a></li> <li ><a id="menu9" href="/privacy" title="Privacy">Privacy</a></li> <li class="last"><a id="menu10" href="/sitemap" title="Sitemap">Sitemap</a></li> </ul>--> <ul><li ><a id="menu1" href="http://www.quitsmokingin10days.com/home" title="iQuit Smoking Home">iQuit Smoking Home</a></li> <li ><a id="menu4" href="http://www.quitsmokingin10days.com/product" title="iQuit Product">iQuit Product</a></li> <li class="active"> <span>Quit Smoking Blog</span> </li> <li ><a id="menu6" href="http://www.quitsmokingin10days.com/about" title="About iQuit">About iQuit</a></li> <li ><a id="menu7" href="http://www.quitsmokingin10days.com/contact" title="Contact Us">Contact Us</a></li> <li ><a id="menu8" href="http://www.quitsmokingin10days.com/faq" title="FAQ">FAQ</a></li> <li ><a id="menu9" href="http://www.quitsmokingin10days.com/privacy" title="Privacy">Privacy</a></li> <li class="last"><a id="menu10" href="http://www.quitsmokingin10days.com/sitemap" title="Sitemap">Sitemap</a></li> </ul> </div>
<!--[!Wayfinder?&startId=`0`&includeDocs=`1,4,5,6,7,8,9,10`&rowTpl=`menuTpl`!]--> [!Wayfinder?&startId=`0`&includeDocs=`1,4,5,6,7,8,9,10`&rowTpl=`menuTplYAMS` &parentRowHereTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/parentrowhere.tpl` &parentRowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/parentrow.tpl` &hereTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/here.tpl` &innerRowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/innerrow.tpl` &innerHereTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/innerhere.tpl` &activeParentRowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/activeparentrow.tpl` &categoryFoldersTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/categoryfolders.tpl` &startItemTpl=`@FILE:assets/modules/yams/tpl/wayfinder/doc/startitem.tpl`!]
<li [+wf.classes+]><a id="menu[+wf.docid+]" href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a></li>
<li [+wf.classes+]><a id="menu[+wf.docid+]" href="(yams_doc:[+wf.docid+])" title="[[YAMS? &get=`content` &docid=`[+wf.docid+]` &from=`pagetitle`]]">[[YAMS? &get=`content` &docid=`[+wf.docid+]` &from=`pagetitle`]]</a></li>
The rowTpl template is used to output each document, folder, or weblink (unless one of the templates below is used)(I have highlighted the important bit.) There is similar extra logic for the outerTpl too, which is only overridden by the innerTpl if it is specified.
&rowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/mode/row.tpl`