Subscribe: Knowledge Base
Preview: Knowledge Base

Knowledge Base

Published: 2010-05-07T13:52:01+00:00




The StructureFrame fieldtype works with Pixel & Tonic’s FieldFrame and is intended to link to other site pages. It gives the user a dropdown menu to select from a list of nested site pages and outputs the page URL when called through templates.

Categories: Sorting and Displaying Content


Because Structure relies on exact URLs, the normal way of doing dynamic categories will not work. You can easily replicate this functionality by passing strings. Enable PHP in your template and set parsing to input, then use the following:

Category Links

Link to your categories in the following format:

In this, 3 is the number of the category you want to display. This can be created dynamically with EE tags.

Displaying The Category Content

{exp:weblog:entries weblog="your-weblog" category="<?php echo $_GET['category']; ?>" dynamic="off"}

NOTE: The above character entities need to be replaced with actual brackets, and are blocked by EE as a security measure

Converting To Clean URLs

In your htaccess file, place the following code at the end:

RewriteRule ^path/to/page/([0-9]{4})$ /path/to/page?category=$1 [L]

This will make your category URL look like: /path/to/page/3

Note: This must appear after the rewrite rules:

RewriteEngine On
RewriteBase /

Displaying Comments


You can use the page_id tag to call comments on any detail page using the following code:

Comment Entries

{exp:comment:entries entry_id="{exp:structure:page_id}" parse="inward"}

Comment Form

{exp:comment:form weblog="blog" entry_id="{exp:structure:page_id}" parse="inward"}

Conditionally Display Content If A Page Has Children


{if '{exp:structure:child_ids}' != '0'}
<p>This page has children!</p>
<p>This page does NOT have children!</p>

Multi-Language Sites


The recommended method is to have your default language at the top level and make separate branches for your alternate languages like this:


You can then use the nav_sub tag and either the start_from or exclude_status parameters. When using exclude_status you can assign statuses by language to control the output.

Example nav_sub code:

{if segment_1  'es' OR segment_1  'fr'}
	{exp:structure:nav_sub start_from='/{segment_1}/{segment_2}'}
	{exp:structure:nav_sub start_from='/{segment_1}'}

This method does not require different custom fields per language as they’re all separate pages powered by the same code and quite often the same templates.



  • PHP 5+
  • MySQL 5+
  • ExpressionEngine 1.6+ (EE 2.0 compatibility will be released in March 2010)
  • Extension: jQuery for the Control Panel (using jQuery version 1.3.2)

Site License Information


Each site license can be used on one public-facing website or intranet at a time. Each MSM-based website counts as one website. You may install Structure on an unlimited number of private, in-development websites. Full refunds are available within 30 days of purchase if you’re not satisfied.

Visiting The Structure Screen Erases My Data


Make sure you didn’t create the tab after changing settings or it will append a string that includes info to erase the settings every time you visit. Clear the tab under My Account » Customize Control Panel » Tab Manager and then revisit Modules » Structure to resave it.

Where is The Structure Tab?


You have to add custom tabs for yourself through the EE CP.

To add the Structure tab:

1) Go to Modules » Structure
2) In the top right of the CP click “New Tab”
3) Save it

Blank Extension Screen


If your extension screen is blank after installing Structure try the following:

  • Verify your PHP version is at least 5
  • Increase PHP memory_limit. In your .htaccess file, place this rule: “php_value memory_limit 16M”
  • Make sure your extension file has the permissions 755
  • Restart MySQL + Apache