-
Notifications
You must be signed in to change notification settings - Fork 0
Docs MVC ViewEngines Memphis
The Memphis view engine is based on the ucuo Framework that was developed at Metrix Internet Design GmbH by Stephan Schmidt, Gerd Schaufelberger and others 4-5 years ago and is still in use at 1&1 Internet AG for some of their PHP sites. We took the basic thoughts from the ucuo Framework, adopted them to today's design principles and the MVC solution of Stubbles because the solutions have been approved in the past and still fulfil all needs that are required. The reason we call it Memphis is that the ucuo Framework was named Memphis internally at 1&1 after one of the machines where it was installed.
Base for the Memphis view engine is patTemplate in version 3.1.0. See the patTemplate website for its documentation and usage. Memphis also supports the website cache. See caching whole sites for more informations on this topic.
To use the Memphis view engine you need to configure the appropriate processor in the processor configuration. The processor class for this is net::stubbles::websites::memphis::stubMemphisProcessor. For information on how to configure the processor configuration see Controller, Processors and Processor resolvers.
Basically, a Memphis page consists of the frame and one or more parts. While the frame includes general stuff like header and footer and therefore the general design of the site, parts are embedded into the frame. For each part there is a placeholder in the frame that will be replaced with the content of the part when the page is generated. Both frames and parts are completely configurable by the user.
All HTML is stored in templates. By default, the template directory is path/to/stubbles/projects/$PROJECTNAME/templates, but this can be changed by setting the net.stubbles.websites.memphis.templateDir value in the registry. See using and configuring the registry for information on how to configure the value.
The Memphis processor defines several global template variables which are available in every template:
- {UCUO_FRAME}: name of the selected frame
- {PAGE_TITLE}: content of the title property of a page.
- {PAGE_NAME}: name of the requested page
- {VARIANT}: name of the selected variant, see testing customer experience with variants for more information about variants.
- {SID}: name of the session and the session id: session_name=session_id.
- {SESSION_NAME}: name of the session
- {SESSION_ID}: session id
- {SSL_MODE}}: yes if the page was requested via SSL, else no.