Pages

Site pages are folders with html templates and code files. When start, framework load bootstrap files placed in pages folder and it's subfolders. After that framework run the page. URL in this case is a path from pages folder to page directory.

For example, if URL is "http://mysite/shop/goods", then system try to find page directory by path "pages/shop/goods".

If URL does not contain folders, then framework try to find page with a magick name "index".

Each page folder usually contain:

  • template.html - html file like this (in real you may use any tags):
    <!DOCTYPE html>
    <html>
        <head>
            <!-- HTML -->
        </head>
        <body>
            <!-- HTML -->
        </body>
    </html>
  • Server.hx - server code class:
    class Server extends BaseServer // class BaseServer will be autogenerated
    {
        function init() { ... }
    }
  • Client.hx - client code class:
    class Client extends BaseClient // class BaseClient will be autogenerated
    {
        function init() { ... }
    }
  • config.xml - page's config file:
    <config>
        <!-- page can extends another -->
        <extends component="pages.layout" />
    
        <!-- you must import components to use in your template.html -->
        <import component="components.haquery.*" />
        <import component="components.myproject.*" />
    </config>
  • support - folder for your page's support files (images, native codes, sounds...);

version #126, modified 2013-01-26 21:55:43 by yar3333