cancel
Showing results for 
Search instead for 
Did you mean: 

Use YUI2 component within aikau page

christianjanker
Champ on-the-rise
Champ on-the-rise
Hey all,

I tried to load a YUI2 - Widget within an aikau page but the YUI component does not render. The other way around it works just fine. (Loading a Dojo Component within a page template mixing yui2 and dojo components, e.g share-header)

This is what i have tried:

simple-page.get.html.ftl:

<@markup id="js">
   <@script type="text/javascript" src="http://localhost:8083/share/js/example/widgets/YahooWidget.js" group="dashlets"/>  <!– 😄 –>
</@>

<@markup id="widgets">
   <@createWidgets group="dashlets"/>
</@>

<@processJsonModel group="share"/>

<@markup id="html">
   <div id="aikau-widget"></div>
   <div id="yui-widget"></div>
</@>


May someone else tried this too and can give me a hint.

thx
Christian
2 REPLIES 2

ddraper
World-Class Innovator
World-Class Innovator
If you're creating a "full" Aikau page (e.g. your page URL begins /share/page/dp/ws/…) then you will need to ensure that you're wrapping the YUI widget in an Aikau widget and declaring a nonAmdDependency. An example of this is in "root/projects/slingshot/source/web/js/alfresco/layout/AlfSideBarContainer.js" which wraps a YAHOO.util.Resize widget.

thx dave!

I guess in near future YUI2 stuff will be gone. Am I right?