Websites
Core to the ability to serve pages is the mechanisim for creating and building websites. In Midgard this is divided into a number of components,
The Host (Website)
- A root level Host (which is a top level domain eg. www.xyz.com)
- or a host with a prefix eg. www.xyz.com/test
The Pages
- Root or Base Pages
- Sub Pages
- Page Elements
Pages
When you define a host, and visit it (like www.xyz.com or www.xyz.com/test above) the page that is displayed is the root page of the site.
Unlike the standard 'file system' type web serving, Midgard has no concept of directories. So the root or base page is only returned when browsing to http://www.xyz.com/ the page http://www.xyz.com/index.html will return an error (unless the root page is 'active' or when a subpage or article 'index' exists).
Midgard pages are regarded as PHP documents and can contain PHP code or Midgard element calls just like a normal .php file would.
Subpages
Underneath the root page can be a number of other pages, for example a 'subpage' called test would resolve to http://www.xyz.com/test/ or http://www.xyz.com/test.html - so subpages can be regarded as a hybrid directory/file system.
Shared root pages
The root, or base page can be shared by a multitude of hosts, so that different URL's can produce the same web pages. This can be usefull when using 2 midgard servers, 1 for internal and 1 for external, where the external site is a 'replicated copy' of the internal one, and has the internet domain eg. www.xyz.com is visable on the external site, but shares the same pages as internal.xyz.com so that it can be previewed internally prior to updating (see notes on replication for more details about this concept).
Page elements
Each page can have pageelements - these are pieces of HTML or PHP code that can be included into the main page by using the <pageelementname> tags, the special pageelement <code-init> is included automatically before the contents of a page.
How a page is displayed
Pages are very closely related to Styles - the steps by which the system generates a page can be summarized by.
- the pages's code-init element
the ROOT style-element from the pages' style
- any other page or style element included from that ROOT styleelement
if the ROOT or any style element which is included contains <(content)> then the content of the page will be included
- note that by default our interface uses a default style of 'Empty' which only contains this <(content)> element. Hence you can upload any HTML directly into a new page and it will work.
Functions
Websites (all this is only available to members of the group that own the host)
- Host/Website Creation - (This may only be done by System Administrators)
Renaming the Host eg. modifying the domain,prefix and port or sitegroup - (This may only be done by System Administrators)
- these are restricted to System Administrators to prevent the Sitegroups creating overlapping pages, eg. making pages on another Sitegroup's URL etc.
Modifying and creating ROOT pages - eg. using other Root Pages for the site.
- Modifying the need for authentication to access the site. (eg. whether a pop up box requesting a password is shown)
Taking the site on/off line
- (Available to members of the Group that owns the Host.)
Pages (to edit pages, you must be a member of the group that owns the host)
- Preview the Page (as is)
Edit the page
- Edit the 'content' of the page (see note above about styles and content).
-
- Add or access Page Elements (only available for "Power users")
- Add or access New Sub Pages
- Change/Add parameters - user defined additional information
- Look at a list of changes made to the page.
- Delete the page
Revision control
- Whenever a page is updated, a copy is written to the computers hard disk in an industry standard way, such that it is possible to view and go back to previous revisions of the document.
Approval
- Pages can be tagged as approved, always approved, approved starting on a date or not approved.
This is used when replicating to another midgard database - for more information refer to the Staging and live section
- Delete a Page
- Edit a Page
- Navigating the Website Tree
- Page Approval
- Page Elements
- Page Revision Control
- View/Modify Page Details
- View/Modify Website Details
- Websites
