Structure Entries

Developer

Peter Lewis

3rd Party (Free)

8 downloads (last 90 days)

Creative Commons Attribution No Derivatives

EE Version Support

  • ExpressionEngine 1.x
  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

Extends the excellent Structure module with a tag pair that allows you to output your Structure managed pages with your own html markup, with control on the depth of parent/child and is completely independent of weblog:entries (doesn’t sit inside {exp:weblog:entries} tag). It also supports categories and FieldFrame.

For support please do not post on the devot-ee forum, as your question/issue will not be answered, please post on the official support forum:

Latest version v1.3.4: The latest Beta version can be found here which has a lot of issues resolved, but has issues with deep structures and incorrect closure.

This can be used to output a menu, summary of a group of pages, bullet points on screen, whatever, with complete freedom over your html markup.

Latest: new variables added {current_parent} and {parent_active} to EE2 version.

Requires Structure to be installed!

Now with full FieldFrame and Matrix support built-in - no more hacking FieldFrame!

Code:

{exp:structure_entries 
     depth="2" parent="10" category_id="7" limit="4"}
...
Your html markup and EE Fields.
...
{/exp:structure_entries}

It’s a tag pair, so always needs the closing tag. All parameters are optional, defaults are shown below.

Parameters:

  • depth - to restrict how deep the output is (defaults to 0 - all)
  • parent - to only show the children beneath the specified parent (including grand-children, etc).  This can be either the entry_id of the parent or the path to the parent. For multiple entry_id’s separate with “|”.
  • category_id - the category ID that you want shown - only entries (including children) assigned to the specified category will be shown.
  • limit - restricts the output so only the amount of pages you specify will be shown (handy for summary pages, where you might only want to show a few of the child pages). Default is unlimited.
  • status - limit output to a specific status (can only handle one status), by default outputs all status except “closed”.
  • convert_html - parses output to convert relevant characters to HTML entries (e.g. ‘&’ becomes ‘&’), default is false.
  • parse=“inward” - this is a built-in EE parameter which will parse this plug-in before processing any add-ons within (e.g. imgsizer, word_limit)

Variables:

Additional variables available (beyond the standard EE fields and custom fields) include:

  • {page_uri} = Is the entry URL value
  • {page_url} = Is the URL to the entry as returned by Structure
  • {current_page} = returns 1 (true) if the current page matches the page output by the entries loop
  • {current_parent} = returns 1 (true) if the page output by the entries loop is the parent to the current active page
  • {parent_active} = returns 1 (true) if the page output by the entries loop is the child to the current active page
  • {depth} = Displays the current level of pages deep this page is (how many parents it has)
  • {parent_id} = Entry ID for the parent of the current page, if it’s top level, it returns 0
  • {count} = running counter for all entries that match the supplied parameters
  • {total_children} or {children_total} = Total entries that match the supplied parameters (depth, parent & category)
  • {last_child} or {last_sibling} = Returns true or false boolean to indicate if the entry is the last sibling in the current group and level of entries
  • {sibling_count} = running counter of siblings working through the current group at the same level
  • {total_siblings} or {sibling_total} = total siblings for the current group at this level

Example Code:

Example 1 (very basic):

{exp:structure_entries}
  {title}
{/exp:structure_entries}

Which will list all structure entries (any depth/level) and any fieldname/variable specified within the template tags will be shown.
FF Matrix is supported with a very minor amend to the FieldFrame code.

Example 2:

{exp:structure_entries parent="10" depth="1"}
  <li><a href="{page_uri}"><img src="{theme-url}/images/{page_url}.gif" alt="{if " /></a></li>
{/exp:structure_entries}

Displays the children (1 level) of a specific parent, using images and custom fields as an alternative to {title}.

Example 3:

{exp:structure_entries category_id="6" depth="1"}
  <li><a href="{page_uri}">{if "{alternative-title}" != ""}{alternative-title}{if:else}{title}{/if}</a></li>
{/exp:structure_entries}

Similar to example 2, but defined by a category.

Example 4:

{exp:structure_entries}
{if {depth} == 1}{!-- Top Level --}
    <li {if {current_parent}}class="current"{/if}{if {current_page}}class="active"{/if}>
        <a href="{page_uri}">{title} Depth={depth} Parent={parent_id}</a>
  {if {children_total} == 0}{!-- No Children - so close markup --}
    </li>
  {/if}

{if:else}{!-- Children (not top level) --}
  {if {sibling_count} == 1}{!-- First child - so open markup --}
        <ul class="level{depth}">
  {/if}
            <li {if {current_parent}}class="current"{/if}{if {current_page}}class="active"{/if}>
                <a href="{page_uri}">{title} Depth={depth} Parent={parent_id}</a>
  {close_markup}
    {if {total_children} == 0 || {depth} == {restricted_depth}}
                    </li>
    {/if}
    {if {last_sibling} && {sibling_count} == {sibling_total}}
                </ul>
        </li>
    {/if}
  {/close_markup}
{/if}
{/exp:structure_entries}

This displays multiple levels with custom markup based on a category.

Latest Change log (see plugin header for full changelog

v1.2.1 Fixed some bugs and errors (db results_array and parentMatch variable)
      New variable added: {current_parent}
      New variable added: {parent_active}
v1.2.2 Fixed bug with extra “/” being added at front with index.php rewrites
v1.2.3 Fixed bug with current_page flagging root as current on certain listing pages children
v1.2.4 Fixed close_markup bug(s)
v1.2.5 Various fixes and re-coding
      current_page & current_parent variables improved
      added no_results variable
      added Next and previous functions
      added parsing of directory variables
      added Matrix support (tested with v2.0.11)
v1.2.6 Fixed bug with Matrix integration
v1.2.6b Disabled Matrix integration due ot user issues
v1.2.7 Minor fixes including multiple parents & include_parent bug

Download Structure Entries

EE Support Downloads Add-On Version Release Date
Not Specified Download 1.1.2 Feb 23, 2011
Not Specified Download 1.2.8 Apr 9, 2011

Structure Entries Links

This entry was created January 25, 2010, 6:24 am.
This entry was last updated August 13, 2013, 9:43 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

7 Reviews:

Amity Web 01.29.15

Amity Web
Rating - {addon_rating_average}

In principle this is a good addon, as it allows to markup navigation HTML which you cannot in Structure! BUT two major issues… (1) Any more than 2 levels deep and your site slows down A LOT. Even caching turned on did not speed it up, and (2) the developer will longer supporting it to fix it.

doctorlove 01.28.13

doctorlove
Rating - {addon_rating_average}

great addon, but lots of queries needed!

Christopher Healey 06.11.11

Christopher Healey
Rating - {addon_rating_average}

@dcghost checkout the Etsur Entigy plugin for structure, that’s exactly what it does, I would assume it’d work with this as well.

Bryant 05.11.11

Bryant
Rating - {addon_rating_average}

Great plugin, but very query intensive.  Fairly simple outputs can easily add 50+ queries.

mzltd 12.29.10

mzltd
Rating - {addon_rating_average}

Great plugin, definitely makes working with structure a little easier.

dcghost 12.24.10

dcghost
Rating - {addon_rating_average}

Would be nice to have the variable {page_template} witch will return the template name. Maybe that is already exists?

Bransin 04.17.10

Bransin
Rating - {addon_rating_average}

It would be nice if Structure and this plugin were combined. Before I knew of this plugin, the output HTML Structure provided was not exactly what I had in mind. This forced me to change a lot of CSS to work with the new generated markup.

Great plugin, and must have for any complex site!