Structure is a new way to build ExpressionEngine sites. It forgoes the current template_group/template setup and creates “static” and “listing” pages that are all editable through a tree sitemap view. Now, traditional page style content and multiple entry pages can live within the same area. Your clients & authors will rejoice.
Download structure103.zip v1.0.3 (72k)
By downloading this software you assume all responsibility for its use and absolve nGen Works of any liability and/or responsibility of any kind.
Requirements
- PHP 5.2 or greater
- CP jQuery (included with EE as of version 1.6.5)
Installation
- Make sure the native EE Pages module is not installed, uninstall if not
- In each weblog, turn off "Display Pages Submission Fields." Otherwise, it will attempt to post Pages data and cause an error.
- Enable the extension CP jQuery under Admin » Utilities » Extension Manager
- Copy extensions/ext.structure_ext.php to /system/extensions/
- Copy language/english/lang.structure.php to /system/language/english/
- Copy modules/structure to /system/modules/
- Enable the extension under Admin » Utilities » Extension Manager
- Go to the Modules tab
- Click "Install" in the row for "Structure"
Getting Started
- Setup your weblogs & custom fields
- Assign default templates for each weblog under Structure » Settings
- Create your first entries through the Publish tab and add URIs under the Structure tab while editing the entry
- Further pages can be added by the same method and assigning parents under the Structure tab or through the “add page” link next to each page
- Structure will automatically generate URIs for you if you leave them blank
Configuration
- Templates can be changed any time per page by editing the “Template” dropdown under the Structure tab when editing an entry
- Various changes and preferences can be set under Structure » Settings
- Administer Structure: users can make changes to Structure settings and have unlimited reordering capability
- View publish/edit Structure tab: users can view the Structure tab when publishing or editing to update URLs, change templates and manage listings.
- Access Structure page: users can access the Structure module
- View add page link: users can use the “add page” functionality
- Can reorder (limited): users can reorder pages within the same level, except top level pages (this stops them from breaking top level or main navigation)
- Can delete (limited): users can delete Structure pages (except top level pages), but it does not delete the entry
- Clicking “add page” next to an existing one creates a child page and utilizes the same weblog as the parent
Displaying Content & Linking to Pages
A regular weblog tag will display content as long as you don’t have dynamic="off" as a parameter in {exp:weblog:entries}. Pages can be linked to within {exp:weblog:entries} with the variables {page_uri} and {page_url}.
Adding Listings
A page with “static content” can also have a listing. This is basically a bridge between the publish and edit tab with Structure for easier access for authors. This places “Add / Edit” links next to the page name. “Add” cues a new entry for the weblog it’s assigned to while “Edit” cues the Edit tab and sorts entries for only that weblog. This can only be done if you have a weblog not being used for your “static” pages and can NOT be shared with another listing. By assigning the default template under Structure » Settings you decide which template those single entries use.
- When editing an entry use the Structure tab to mark the checkbox for “Listing”
- Select which weblog you want the listing entries to post to (this is NOT the weblog the “page” content will post to, but what the “Add / Edit” links use)
- The template your main listing page uses will need a {exp:weblog:entries dynamic=”off” weblog=”YOUR_LISTING_WEBLOG”} to display the entry listing
- Once on the single entry/detail page any {exp:weblog:entries} tag will display content as other normal Structure pages.
Breadcrumbs
{exp:structure:breadcrumb}
The breadcrumb tag displays in a standardized format and has a few parameters to control its output.
Format
Path » To » This » Page » Here
Seperator
{exp:structure:breadcrumb separator=" : "}, "»" by default
Home Link
{exp:structure:breadcrumb inc_home="no"}, "yes" by default
Include "Here" (current page)
{exp:structure:breadcrumb inc_here="no"}, "yes" by default
Page Title Instead of "Here"
{exp:structure:breadcrumb here_as_title="yes"}, "no" by default
Title Trail
{exp:structure:titletrail}
The titletrail tag displays in a standardized format and has a few parameters to control its output.
Format
Page You're On » Parent Page » Top Level Nav » Site Name
Seperator
{exp:structure:titletrail separator=" : "}
Parent Title
{exp:structure:parent_title}
Returns the current page's parent title
Change Log
- 1.0.3 12/10/2008
- {exp:structure:nav_sub} update: if all pages are hidden, empty ul is not generated
- Fixed a MySQL bug that occurred when deleting an entry
- Masked access compatibility: added PATH/system path to ext.structure_ext.php
- {exp:structure:breadcrumb} new parameters:
- inc_here to show current page or not
- here_as_title to show page's title instead of "Here"'
- {exp:structure:parent_title} tag added to return the current page's parent title
- Reordering compatible with non-root installs (credit to Maurice Calhoun - mauricecalhoun.com)
- 1.0.2 11/07/2008
- URI bugs fixed
- Accommodate the "/" URI entry for Home (no slug)
- "/" now shows in the edit form once set so it will stay
- Blanking out the URI field will rebuild the URI from the Title value using the Weblog/Section settings for dash or underscore
- Changing the URI of a page with children and/or a listing will update all URIs
- Reordering a page with children and/or a listing rewrites the URIs for all children and listings
- {exp:structure:nav_sub} now creates CSS class names (sub-level-0) using the Weblog/Section settings for dash or underscore
- {exp:structure:nav_sub} has new parameter "exclude_status" to hide any single or multiple user defined status
- {exp:structure:nav_sub} uses site_index value to create the links, not just the root
- {exp:structure:titletrail} tag added for title tags
- MSM support added
- added install/upgrade functionality
- adds site_id column to exp_structure table
- sets site_id for each Structure entry from exp_weblog_data
- Settings button matches CP style
- Improved visual feedback for dragging pages
- Deleting from Structure update
- Set status of "closed" on entries deleted by Structure
- children will be marked as closed and removed from Structure
- entries/listings will be removed from Structure only, status will not be changed
- URI bugs fixed
- 1.0.1 9/25/2008 - Subnav tag nested li bug fix
- 1.0 9/19/2008 - Released
Restrictions
Unless you have been granted prior, written consent from nGen Works, you may not:
- Reproduce, distribute, or transfer the Software, or portions thereof, to any third party
- Sell, rent, lease, assign, or sublet the Software or portions thereof
- Grant rights to any other person
- GPLv2 software has been used for the javascript in this module and do not carry to those portions
