HaQuery support inheritance both for pages and components.

To specify base page/component use <extends> tag in your config.xml.

src/components/test/b/config.xml file:

    <extends component="components.test.a" />

Code inheritance

Code work as with regular inheritance. Inherits your Server and Client classes from BaseServer and BaseClient (from same package) to autodetect base classes. Files BaseServer.hx and BaseClient.hx for each page/component will be autogenerated into the gen folder during compilation process.

Template inheritance

Template file content will be appended to the base template.

src/components/test/a/template.html file:


src/components/test/b/template.html file:


Rendering of b component (<haq:b />):


Often you need not just append template with a new html piece, but insert it into middle of base html or even change html piece of base template to another. For that you can use placeholders.

version #129, modified 2013-01-26 22:09:08 by yar3333