Design-Time look - Render HTML in Extension Builder

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
alexh225
 
 
Posts: 11
Joined: Mon Feb 01, 2016 1:44 pm

Design-Time look - Render HTML in Extension Builder

Post by alexh225 » Tue Feb 02, 2016 9:55 am

Hi guys,
I have a question related to the point how to ensure consistent look & feel for extensions.
As far I understand the only way to control the visual aspects of the the extension can be done by using "Render HTML" .
This has to contain the preview HTML and ALL CSS styles that should be available in the preview at design-time.
For example:
I have a option property (lets call it btn-type) where the user can select different style of a button - btn-red, btn-orange.
The live preview seems to consider only what is added under "Render HTML"
So my content there looks like:

Code: Select all

<button type="button" class="$btn-type$" id='$ID$' style="width: 100%; height: 100%;">
  $btn-text$   
</button>

<style type="text/css">
.btn-red{
  /* Styles for btn-red */
}
.btn-orange{
  /* Styles for btn-orange */
}
Is this the only way to add design time related styles?

At the same I have the same styles added to the "Between <head> tag", "Between <style> tag", but they seems to be only relevant for runtime.

Best Regards
Alex

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

Re: Design-Time look - Render HTML in Extension Builder

Post by Pablo » Tue Feb 02, 2016 10:28 am

Is this the only way to add design time related styles?
Yes. There is no other way. Extensions run in their own environment, they do not have access to global styles.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests