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 structure102.zip v1.0.2 (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

  • PHP5
  • 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
  • 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.

Sub-Navigation

{exp:structure:nav_sub exclude_status="hidden|no_sub_nav"}

The nav_sub tag is intended for sub-navigation and will show up to two levels of <ul>s at a time. It dynamically shows pages at the same level and jumps to a child’s level if it has children itself. The logic is for a very specific use and at this time does not include attributes to control it’s output. The tag will automatically add class="here" to the current page’s <li>

Exclude Status

The parameter "exclude_status=" can be used to hide any single or multiple user defined statuses using the pipe character. This is useful for form confirmation or non-structural pages you don't want to appear in the sub-navigation

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=" : "}

Do Not Include Home Link

{exp:structure:breadcrumb inc_home="no"}

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=" : "}

Screenshots

Change Log

  • 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
    • nav_sub now creates CSS class names (sub-level-0) using the Weblog/Section settings for dash or underscore
    • nav_sub has new parameter "exclude_status" to hide any single or multiple user defined status
    • 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
  • 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