Using portlet in HTML

The portlet is function to reuse html pages and form inside another HTML. This function is used in some applications. One of the example is Template Engine of the Alinous Document CMS.

On the WYSIWYG Content editor, it can embed a Html Template into a Content as inline template. The function is implemented by using this function.

 

About the portlet

After making a sample project, launch server, and access to

http://localhost:8080/

with web browser, a page below is shown.

Alinous-core sample project's portlet part

Surrounded area is "td" tag, and this contents is from "/default.html". You can embed other page's html into td, span, and div tag.

Next access to

http://localhost:8080/default.html

Then the page below is shown.

embeded html in the portlet

How to wirte

In order to use portlet, you have to know 2 stuffs.

Name the tag and embed default page

 For example, embed html into td tag. Write like bellow.

The attribute "alns:tagid" name the tag. And "alns:inner" attribute specify the first HTML to be embeded.

You can do same thing to "div" and "span" tag.

Embed other page into named tag by anchor(a) tag

 Extract other page into the tag named by "alns:tagid". Write like bellow.

 If you wanted to embed into the embeded area. Write "this" as value of "alns:tagid" attribute.


Go to Top