Hello,
I developed a simple module today to provide EE with WordPress style static pages. I found this helpful for creating client sites that needed several pages with only one entry.
Module
The module works by allowing only one entry per category within a certain weblog. For example, I’ve named a weblog “Pages” and added my site’s footer structure in that weblog’s category group. So, when publishing a “Static Page” you can choose from “About”, “Privacy”, “FAQ”, “Contact” etc. under categories. Now, when a user goes through the Pages module to update their “About” page it checks to see if there is already content published within the “About” category in the weblog “Static Pages”. If there is it will bring up the existing entry, or if not, it will load an empty entry form with “About” category already selected.
I would suggest adding this module as a new tab so that your admin screen reads “Publish | Edit | Pages” for easy navigating. I’ll usually explain this as “Publish” is for dynamic content such as news articles and blog posts, while “Pages” is for static content such as About.
Extension
BE SURE TO ENABLE THE EXTENSION: It is not enabled at the same time as the module.
Several people have had trouble with the template side of things. In all of these cases it was due to the extension not being turned on. Please check that the Pages extension (under Admin » Utilities » Extension Manager) is turned on before asking any template questions it will save you a good deal of time while debugging.
The extension (once enabled) will allow your static pages to use their own custom template, without needing a physical template group. Under the extension settings you can enable wether these ‘static’ templates should override physical template groups/templates.
Plugins
There are two plugins bundled with this module, the first is the ‘Pages Results’ plugin, to be used on the search results page.. Simply wrap your entire search results within the {exp:pages_results /} tag to fix any links appearing within the search results. Secondly the ‘Static Page Path’ plugin creates bread crumbs or navigation. Use it to create bread crumbs as follows:
{exp:static_page_path backspace="3"}<a href="{url_title}" title="{title}">{title}</a> » {/exp:static_page_path}
Or use it to see sub pages of a static page by including the ‘direction’ attribute:
{exp:static_page_path direction="post"}<a href="{url_title}" title="{title}">{title}</a>{/exp:static_page_path}
That will output a nested list, if you would prefer a flat list use the ‘nest=“false”’ attribute. Within a nested list, if you’d like to only show one level include the ‘depth=“1”’ attribute, or substitute any number to show x levels below the current static page. Or if you’d prefer to show all your static pages just pass it a ‘page=“0”’ to show all pages. You can substitute the “0” for any category id, to show all sub-pages below that page.
Let me know if you found this module useful!
Mark.
WARNING (READ: BETA): There are known bugs with this module. Please download and use it only if you are an experienced EE developer.
