Pages

From OpenPSA Wiki

Jump to: navigation, search

erreltrocl Pages are meant to contain the business logic of the website. They can contain Subpages and Page Elements, look like directories on a Midgard-enabled Host and are represented in the URL as /page/subpage/. In a Midgard MySQL Database, they are stored in the tables page and page_i and are based on the MgdSchema midgard_page.

Pages are always linked to a Style, either their own or one they inherited. For each Page, the type static or active can be selected and Authorization can be required.

Each Page containing or inheriting a non-empty ROOT Page Element can load contents from any Topic. This is achieved by using the "path" to the Page after the hostname in the URL: /page/subpage/topic will load the Topic's content using the program logic from subpage as well as the functionality inheritet from page and Host's the Root Page (in this case, /) and the associated Style. If you access the same Topic via /topic, the Root Page and the associated Root style will be used instead. For information about inheritance, please refer to Templating in Midgard and Templating in MidCOM.

[edit] Using Pages for serving Stylesheets

Pages can be used to inclde CSS Stylesheets, Javascript or similar content. However, this creates significant overhead for each requested web page (especially when MidCOM is involved), so if at all possible, Stylesheets should be served from the filesystem instead.

Personal tools