Hi Michael,

You're right in saying that each widget needs its own folder with an HTML, 
config and JavaScript file.
The widget HTML page contains the elements specific for that widget. You will 
notice that the file does not have the usual structure (with body, head, 
title,…) because widgets are injected into the page later on (pages like 
/dev/index.html, /dev/content_profile.html, …).

To load a widget into the page we create a div with a specific ID. e.g.: <div 
id="widget_topnavigation" class="widget_inline"></div>.
This is picked up by the widget loading mechanism in sakai.api.Widgets and the 
widget HTML is placed inside of the container.

The configuration files for each widget tell the widget where it can be placed, 
what the translations are, etc.

Hope that helps,
- Bert

On 8 Jul 2012, at 17:34, Darakananda, Apisak wrote:

> Hello all,
>  Sorry if this has been discussed elsewhere; I have not been able to find any 
> documentation on it. I am planning to join the project at GaTech this Fall, 
> and I am trying to get a sense of how the project is set up.
>  I am confused by the way the widgets. According to the Hello World demo, 
> each widget is supposed to get its own folder, HTML page, a config file, 
> among other things. I completely agree that a widget should have its own 
> folder, but I don't quite understand what the HTML page and config file are 
> for.
>  The way I currently see it, shouldn't it be enough for a widget to have a 
> method "getRootElement()"? (Of course, the name could be made shorter!) That 
> way to put a widget onto a page, we just need to
>    someContainer.appendChild(myWidget.getRootElement()).
> 
> Thank you for your help!
> Michael
> 
> -- 
> Apisak "Michael" Darakananda
> [email protected]
> "The bus station is where the bus stops. The train station is where the train 
> stops. On my desk, I have a workstation."
> _______________________________________________
> oae-dev mailing list
> [email protected]
> http://collab.sakaiproject.org/mailman/listinfo/oae-dev

_______________________________________________
oae-dev mailing list
[email protected]
http://collab.sakaiproject.org/mailman/listinfo/oae-dev

Reply via email to