• 1 reply
  • Latest Post - ‏2013-12-23T02:27:32Z by Smyle Z. Huang
29 Posts

Pinned topic How to create a web site template in RUI?

‏2013-11-19T10:07:27Z |

Hello All,

I want to create a template for a web site migration

i want to divide the web page to three widgets:

1- Header

2- content

3- Footer

I took the HTML page of the original site and extracted the HTML script of the header which contains the company's slogan and toolbar

and i did the same for the footer part

Now, i want to place the header HTML in a widget and the footer HTML in another widget

to use them as a drag and drop for all my RUI handlers, so how to create these widgets and how to put them in the pallete to be available as drag and drop on any RUI handler?


  • Smyle Z. Huang
    Smyle Z. Huang
    13 Posts

    Re: How to create a web site template in RUI?


    Yes, you can do it by using the innerHTML property. Here is a simple example, not sure if it meets your requirement:

    handler myWidget type RUIWidget {targetWidget = _div, @VEWidget{ category = "Custom" }}

    _div Div{ columns = 3, children = [], innerHTML="<div><h1 style='color:blue; border:1px solid grey;'>This is header!</h1><p></p></dv>" };
    function start()


    If you have embedded scripts to be executed, I recommend you to put them in a separate htmll file and set the includeFile property to refer to this file.
    Embedded script will not be executed when it is assigned to an innerHTML. This is mainly  because the lexical parser can NOT parse nested scripts tags in a html fragment.