Fork me on GitHub
  1. Added support for site alias

    In order to be able to use the same data for different websites, we have just added support for site alias. With this change we also introduced the possibility to change the root node (the node seen on the home page and referred to as “root” in queries).

    The “node without a parent” is now called the “orphan node” to differentiate it from the root node.

    site alias admin

    To add an alias, use rake:

    $ rake zena:mkalias HOST='main.host' ALIAS='alias.host'

    To create all the vhost files, awstats settings, logrotate and such, use capistrano:

    $ mkalias -s host='main.host' -s alias='alias.host' -s pass='stats_password'

    To create conditional execution in zafu, we can use “host” and “master_host” methods on the visitor’s site:

    <html do='set' host='visitor.site.host' main_host='"example.com"'>
      ...
    
      <r:if test='host == main_host'>
        <link rel='Stylesheet' href='/main.css'/>
        <r:else>
          <link rel='Stylesheet' href='/main.css'/>
        </r:else>
      </r:if>
      ...
    </html>
    

    Gaspard Bucher

    comments

    1. Saturday, August 17 2013 10:54 Christian

      Starting with zena v1.2.6 the above ‘root’ and ‘orphan’ nodes are more inuitively called the ‘home’ node of a host (domain) and ‘root’ nodes of a site.

    2. leave a comment