Page 1 of 1

Embedded Page - Multiple use on a page

Posted: Wed Mar 20, 2019 11:25 am
by WWBman
I have a simple embedded page (one shape object, a circle).
Why can't it be used more than once on a page?

I wish to use the circle several times on a page but in future some properties may change e.g. diameter, colour.
I would only have to change the embedded object once.
The shapes on the page will of course all be identical.

Re: Embedded Page - Multiple use on a page

Posted: Wed Mar 20, 2019 11:52 am
by [RZ]
because the duplicated/repeated objects in that page will have the same id

Re: Embedded Page - Multiple use on a page

Posted: Wed Mar 20, 2019 12:14 pm
by Pablo
[RZ] is right, if you use the same embedded page multiple times then the objects will have the same ID.
HTML does not allow this.

Re: Embedded Page - Multiple use on a page

Posted: Wed Mar 20, 2019 12:15 pm
by WWBman
Ah, yes, of course, thanks.
The ability to reuse an object on a page seems to me to be a very useful addition to the software.
In fact, I’m surprised it’s not already there.

Pablo, is it feasible for a future wwb release to have an new object that can be reused?
Alternatively, if possible, to change the embedded page object so that it can be used more than once on a page.

Is it worth me adding it to the Suggestions thread?

Re: Embedded Page - Multiple use on a page

Posted: Wed Mar 20, 2019 2:26 pm
by Pablo
You cannot reuse the same object because then there there will be a conflict with IDs.
But of course you can create a copy of the object so it will get a unique ID.

Re: Embedded Page - Multiple use on a page

Posted: Wed Mar 20, 2019 3:05 pm
by WWBman
Pablo wrote: Wed Mar 20, 2019 2:26 pm... But of course you can create a copy of the object so it will get a unique ID.
But that defeats the reason for my post.
I want to be able to change just one object (master object) as required.
Is it feasible for a future wwb release to have a new type of object that can be reused?
Or better still, allow the embedded page object to be used more than once on a page.

Re: Embedded Page - Multiple use on a page

Posted: Wed Mar 20, 2019 4:57 pm
by Pablo
I'm sorry this is not possible with embedded pages.
When reusing the same object you will always have a duplicated iD unless you make a copy.

Re: Embedded Page - Multiple use on a page

Posted: Wed Mar 20, 2019 6:31 pm
by WWBman
OK.
I was thinking it could have the same ID but (if used more than once on a page) with an added unique suffix to identify it as a reusable embedded object/page.
e.g. Shape1, Shape1-rem2, Shape1-rem3 etc. (rem standing for reusable embedded object/page).
Just a thought.

Re: Embedded Page - Multiple use on a page

Posted: Wed Mar 20, 2019 7:14 pm
by Pablo
That might work for one simple object, but as soon as you add an embedded page with multiple objects or objects that use scripts, events etc then it will be come complicated.

Re: Embedded Page - Multiple use on a page

Posted: Wed Mar 20, 2019 7:19 pm
by WWBman
I only tend to use embedded pages containing just one or a few simple objects so that was what I was thinking about.

Re: Embedded Page - Multiple use on a page

Posted: Wed Mar 20, 2019 8:58 pm
by Pablo
You can post this in suggestions so other users can let me know if they find it useful too.

Re: Embedded Page - Multiple use on a page

Posted: Wed Mar 20, 2019 9:03 pm
by WWBman
OK, thanks Pablo, I’ll do that.