This class is responsible for all style management and replaces the old <[...]> syntax. It is instantiated by the MidCOM framework and accessible through the $midcom->style object.
The method show ($style) returns the style element $style for the current component:
It checks whether a style path is defined for the current component.
To enable cross-style referencing and provide the opportunity to access any style element in the current sitegroup (not only the style that is set in the current page), "show" can be called with a full qualified style path (like "/mystyle/element1", while the current page's style may be set to "/yourstyle").
Note: To make sure sub-styles and elements included in styles are handled correctly, the old style tag <[...]> should not be used anymore, but should be replaced by something like this:
Styleinheritance
The basic path the styleloader follows to find a styleelement is:
NB: This cannot happen after the $_MIDCOM->content() stage in midcom is called, i.e. you cannot change this in another styleelement or in a _show() function in a component.
Located in /midcom.core/midcom/helper/_styleloader.php (line 63)
Simple initialization
Include all text/css attachments of current style to MidCOM headers
append the styledir of a component to the queue of styledirs.
Function append styledir
Adds an extra styledirectory to check for stylelements at the end of the styledir queue.
Switches the context (see dynamic load). Private variables $_context, $_topic and $_snippetdir are adjusted.
List the default template elements shipped with a component
Get list of topics using a particular style
Returns the id of the style described by $path.
Note: $path already includes the element name, so $path looks like "/rootstyle/style/style/element".
Returns the path of the style described by $id.
Switches the context (see dynamic load). Private variables $_context, $_topic and $_snippetdir are adjusted.
prepend the styledir of a component
Function prepend styledir
Looks for a style element matching $path (either in a user defined style or the default style snippetdir) and displays/evaluates it.
Gets the component styledir associated with the topics component.
This function merges the prepend and append styles with the componentstyle. This happens when the enter_context function is called.
You cannot change the style call stack after that (unless you call enter_context again of course).
Documentation generated on Fri, 10 Oct 2008 22:15:27 +0300 by phpDocumentor 1.4.2