I have problems understanding how to render more than one content...

Hello to everybody. I'm trying to understand one thing of Enyo, but I can't. I also get lost reading the docs. :( Maybe you can explain me this little thing.

What I want to do is very simple: take the enyo sample: http://enyojs.com/sampler/
I like the layout with the sliding panel on the left.

Now I want to combine this layout with:

- a sliding menu on the left (like the one in the sampler), e.g:
DOGS
CATS
HORSES

when I click one category, the relative menu slide appear sliding (like the sampler menu already do now):
dog1
dog2

- a text on the right pane (that appear when I click a menu voice, like "dog2")

-----------

How can I render this 3 contents (layout, menu and text) together in the same page?

If I write:

new App().renderInto(document.body);
new MyExample().renderInto(document.body);

the layout is overwritten by MyExample render.

-----------

:) Thanks


Comments

  • When you use .renderInto(document.body) it replaces the ENTIRE contents of the with what you just rendered. If you look at some Enyo apps, you will see that there is generally one kind that gets rendered into and everything else is declared in the various kinds you are using. The Sampler app is a pretty complex one to start with, though, because it does a lot of fancy loading to encapsulate all of the standalone examples.

    Take a look at the bootplate project and its Hello World application: https://github.com/enyojs/bootplate
Sign In or Register to comment.