How can I put elements inside another one?

This section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
Forum rules
This forum section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
Post Reply
newnewnew
 
 
Posts: 1
Joined: Wed Aug 19, 2015 10:20 pm

How can I put elements inside another one?

Post by newnewnew » Wed Aug 19, 2015 10:24 pm

Let's say I created an extension which produces an object. This extension has let's say just '<div class="some-class"></div>'.

When I use the builder, I first put this extension onto the page. Then I want to drag another object (could be checkbox, button, etc.) and I want it to be inside the extension's div. Basically, how do I have containers, nested elements, parent child relation, call it w/e.

I know that if I drag and drop objects into the form object, this nested relationship exists. But it only works with that. How do I make it work with any container.

User avatar
Navaldesign
 
 
Posts: 1051
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: How can I put elements inside another one?

Post by Navaldesign » Wed Aug 19, 2015 11:48 pm

You can't. because WWb executes extensions but it can't know what they are. Extensions are not "seen" as containers or layers.
If, however, the code related to the "extension" is so simple, you could simply use a layer and add the code in the layer HTML.

In particular you can add classes to the layer HTML -> Custom styles
www.dbtechnosystems.com

User avatar
Pablo
 
Posts: 13908
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: How can I put elements inside another one?

Post by Pablo » Thu Aug 20, 2015 5:32 am

You cannot implement containers with extensions, because extensions are not aware of other objects on the page.
But of course you use the a standard layer and add your own functionality in an extension to overwrite the behavior of the layer.

dlod
 
 
Posts: 17
Joined: Thu Mar 15, 2018 7:43 am
Contact:

Re: How can I put elements inside another one?

Post by dlod » Mon Aug 27, 2018 3:54 pm

Use DIV container - the flag is set
Enable layer - the flag is set

Between <body></body>
<div class="name">$OBJECTS$</div>

With this setting, you can drag another object (wb) into my layer (div extension), and everything will work correctly!

But if you move this layer (the div extension) with the object on a different level (wb), then the object in my layer (the div extension) will disappear in the html source code.

Is there a way to avoid the disappearance of the object?

User avatar
Pablo
 
Posts: 13908
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: How can I put elements inside another one?

Post by Pablo » Mon Aug 27, 2018 4:51 pm

But if you move this layer (the div extension) with the object on a different level (wb)
What do you mean by 'different level'?

dlod
 
 
Posts: 17
Joined: Thu Mar 15, 2018 7:43 am
Contact:

Re: How can I put elements inside another one?

Post by dlod » Mon Aug 27, 2018 6:46 pm

drag to another layer (wwb)

User avatar
Pablo
 
Posts: 13908
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: How can I put elements inside another one?

Post by Pablo » Mon Aug 27, 2018 8:17 pm

Extension layers cannot be nested.

dlod
 
 
Posts: 17
Joined: Thu Mar 15, 2018 7:43 am
Contact:

Re: How can I put elements inside another one?

Post by dlod » Tue Aug 28, 2018 6:03 am

Okay, thanks for your help.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests