XCONF Configuration Files

Every EnterMedia site has a top level file named: /_site.xconf that controls the default settings for the site. Additional _site.xconf files may be placed in children directories, such that the lower level _site.xconf files either override or, in some cases, have an additive effect on the settings in higher level _site.xconf files.

Loading xconf files
  1. Load index.xconf
  2. Load /subfolder/_site.xconf (folder level)
  3. Check fallback

/test/_site.xconf
<property name=”fallbackdirectory”>/parent</property>

/test/sub/123.html
/parent/sub/123.html

Example
You can see an example /_site.xconf in our demo site: http://demo.entermediasoftware.com/

<page>

<property name=”encoding”>UTF-8</property>
<property name=”editable”>true</property>

<script id=”jquery” src=”/system/components/javascript/jquery-1.7.1.min.js” />
<script id=”colorpicker-js” src=”/${applicationid}/components/javascript/colorpicker/jquery.minicolors.js”/>
<style id=”colorpicker-css” href=”/${applicationid}/components/javascript/colorpicker/jquery.minicolors.css”/>
<!–
<property name=”authenticationdomain”>workgroup</property>
<property name=”authenticationserver”>192.168.1.1</property>
–>
<property name=”productionmode”>false</property>
<property name=”ftpidprod”>104</property>
<property name=”ftpidtest”>103</property>

</page>

Details

Every property in the root level _site.xconf file can be overriden in any subdirectory.

  1. <generator name=”velocity” mimetypes=”text/html”/> – This means that HTML pages will be processed by the Velocity engine
  2. <generator name=”file” /> – The file generator is the default for the site and does no processing on files it sends back to the browser
  3. <path-action name=”Admin.autoLogin” /> – Will log a user into an OpenEdit web site automatically if the user has not logged out previously.
  4. <edit-requirements>
       <and>
          <permission name="oe.edit" />
          <not><page-property name="editable" equals="false" /></not>
       </and>
    </edit-requirements>

    – This XML structure can be altered from one directory to the next to control permissions. See Edit Permissions*

  5. <page-action name=”Admin.allowEditing” /> – Checkes each page to see if there should be editing allowed for this user.
  6. <page-action name=”HtmlEditor.check404″ alltypes=”true” /> – Will cause a 404 error to happen if a file is missing. If a user has permissions this also asks the user if they want to add the missing page.
  7. <path-action name="LinkTree.loadLinks">
       <linkpath>/links.xml</linkpath>
    </path-action>

    – Looks for a /links.xml file. If it finds one it provides a $linktree object.

  8. <path-action name="LinkTree.setSelectedLinkByUrl">
       <linkpath>/links.xml</linkpath>
    </path-action>

    – Looks at the URL that is being requested and sets the $linktree.selectedLink object to the last valid one it matched

  9. <layout>/layout.html</layout> – Set the default layout for the site. See layouts*

    <inner-layout>/innerlayout.html</inner-layout> – This is a layout that wraps the content in the center of the page.

  10. <property name=”encoding”>UTF-8</property> – Sets the default text encoding used to read HTML pages from the disk drive. Another popular option for windows is ISO-8859-1
  11. <property name=”allowguestregistration”>true</property> – Enables the login form to allow visitors to register for new accounts.
  12. <property name=”hostName”>www.mydomain.com</property> – This is the domain name of the site. To get this domain name to show up on the site just insert $!content.hostName within the source where ever you would like the domain name to appear. Then if later the domain changes you can go back to this property and change the value to another domain and the change will be seen wherever you had placed on your pages $!content.hostName. You could also put just $content.hostName but by inserting a ! after the $ it forces nothing to display if the property has no value (eg. <property name=”hostName”></property>)
  13. <property name=”title”>Example Site</property> – Default Properties for titles, keywords and descriptions that used in the layout files