I'm very grateful that 5.8 allows us to create a Custom Layout, this offers the possiblility of responsive design with corporate identity within seconds!
I do have questions though, is there something like "propertySetters" (as in pui.widget.add) to execute a piece of JavaScript when a layout property value was changed?
Thanks,
Robert
Custom Layout
-
- New User
- Posts: 10
- Joined: Mon Mar 27, 2017 8:03 am
- First Name: Robert
- Last Name: Eggert
- Company Name: H. Gautzsch
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Custom Layout
There isn't something like propertySetters -- that is for when you create a widget. In this case, you are using an existing (Layout) widget.
But, it is possible for JavaScript code to run when the template is evaluated. Take a look at the options for "JavaScript expression variables" documented here:
http://www.profoundlogic.com/docs/pages ... d=31260909
But, it is possible for JavaScript code to run when the template is evaluated. Take a look at the options for "JavaScript expression variables" documented here:
http://www.profoundlogic.com/docs/pages ... d=31260909
-
- New User
- Posts: 10
- Joined: Mon Mar 27, 2017 8:03 am
- First Name: Robert
- Last Name: Eggert
- Company Name: H. Gautzsch
- Contact:
Re: Custom Layout
I developed my CustomLayout after reading the documentation for "pui.retrieveCustomLayoutTemplate( name )"
This is really a great new feature, but I got stuck...
"Properties can potentially be bound to host variables" - How? -> my new properties don't have this option
I also found (when I made a mistake in coding) that the property category can be add... - How to do this properly?
In my new Panel layout there are header sections (like a window control box) that execute a script. In this script I'd like to set a host variable for the specific function...
This is really a great new feature, but I got stuck...
"Properties can potentially be bound to host variables" - How? -> my new properties don't have this option
I also found (when I made a mistake in coding) that the property category can be add... - How to do this properly?
In my new Panel layout there are header sections (like a window control box) that execute a script. In this script I'd like to set a host variable for the specific function...
-
- New User
- Posts: 10
- Joined: Mon Mar 27, 2017 8:03 am
- First Name: Robert
- Last Name: Eggert
- Company Name: H. Gautzsch
- Contact:
Re: Custom Layout
In a CustomLayoutTemplate I do have the following part:
<div class="content"><div repeat="{ property: 'Number of Divs', help: 'Text, text, text...' }" class="tab" container="true">......-X-......</div></div>
At ......-X-...... I'd like to add an array item, i.e. a paragraph to fill the corresponding div.
How can I access that particular item? In other words, is there somthing like an index variable when using "repeat"?
Any help is greatly appreciated,
Robert
<div class="content"><div repeat="{ property: 'Number of Divs', help: 'Text, text, text...' }" class="tab" container="true">......-X-......</div></div>
At ......-X-...... I'd like to add an array item, i.e. a paragraph to fill the corresponding div.
How can I access that particular item? In other words, is there somthing like an index variable when using "repeat"?
Any help is greatly appreciated,
Robert
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Custom Layout
Sorry, there isn't any way to use an array for this.
-
- New User
- Posts: 10
- Joined: Mon Mar 27, 2017 8:03 am
- First Name: Robert
- Last Name: Eggert
- Company Name: H. Gautzsch
- Contact:
Re: Custom Layout
Thanks for the quick answer Scott.
I just can't let off... Is there a way to use containers in custom widgets?
I just can't let off... Is there a way to use containers in custom widgets?
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Custom Layout
If you mean "custom layouts", yes... you should be able to use containers.
If you mean other types of widgets, then no... only a layout can be a container.
If you mean other types of widgets, then no... only a layout can be a container.
Who is online
Users browsing this forum: No registered users and 2 guests