We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New Module: Structure - Uses entries to create a page hierarchy for static and listing pages

Development and Programming

Ryan Faubion's avatar
Ryan Faubion
81 posts
15 years ago
Ryan Faubion's avatar Ryan Faubion

DOH!

Thanks Travis & Erik. I usually figure it’s user error. 😊

       
Chuck Norton's avatar
Chuck Norton
106 posts
15 years ago
Chuck Norton's avatar Chuck Norton
@idawgik Did you create a tab for Structure? Make sure you didn’t bookmark it after changing settings or it will append a string that includes info to erase the settings every time you visit. Clear the tab and and revisit Modules » Structure and resave it. Let me know if that doesn’t work.

I had this same problem and it took quite a while to figure out. Thanks for the update. Maybe post that info on instructions part of buildwithstructure.com?

Thanks either way! Chuck

       
Chuck Norton's avatar
Chuck Norton
106 posts
15 years ago
Chuck Norton's avatar Chuck Norton
@blis Here you go… like I say PHP ain’t my strong point so this can probably be improved. But I managed to make this out of the nav_sub function. Paste into mod_structure.php then just add - {exp:structure:nav_main} to your templates.

I updated this for DROP DOWNS for the newest structure & thought I’d share my code. In mod_stucture.php find this:

foreach ($result->result as $entry_data) {

and replace/add this:

foreach ($result->result as $entry_data) {

        // get children
        $childsql = "SELECT *
            FROM exp_structure AS node
            INNER JOIN exp_structure AS parent
                ON node.lft BETWEEN parent.lft AND parent.rgt
            INNER JOIN exp_weblog_titles AS expt
                ON node.entry_id = expt.entry_id
            WHERE node.parent_id = " .$entry_data['entry_id'] ."
            GROUP BY node.entry_id
            ORDER BY node.lft";
            $childresult = $DB->query($childsql);

then find this:

$html .= "\n<li{$li_class}><a href="http://{path=/" class="child-nav">' . $child['title'] . '</a>' . '</li>';
                        }
                        $html .= '</ul>';
                    }
              $html .= "</li>";
        }

Then add {exp:structure:nav_main} and you can use all the new variables too.

Viola. Thanks wuwongy for the help.

       
digitalblahblah's avatar
digitalblahblah
4 posts
15 years ago
digitalblahblah's avatar digitalblahblah

Hello

Hoping someone can help me, I have read through the documentation and a lot of the thread and can’t find an answer, but if I have missed it apologies.

I really love Structure, its making EE work like a client friendly CMS. There is one thing I can’t figure out. I have a page structure like this:

About - Sub page 1 - Sub page 2 - Sub page 3

On the About page I want to have a listing page which shows details of each of the Sub page e.g.

About

Sub Page 1 Image Intro field

Sub Page 2 Image Intro field

Sub Page 3 Image Intro field

Is there a way to grab all the sub pages and loop through there entries? I have seen the nav generation but I want more than just nav, I want to actually get field values.

Any help much appreciated.

Thanks

Jono

       
Chad Clark's avatar
Chad Clark
20 posts
15 years ago
Chad Clark's avatar Chad Clark

Edit: going to try Chuck Norton’s method above.

       
Brian M.'s avatar
Brian M.
529 posts
15 years ago
Brian M.'s avatar Brian M.

Apologies if this has been mentioned:

I’m running Structure 1.3.1 and EE 1.6.7 (I know I know 😉 ) In the 1.3.1 notes I was really happy to see that the bug that results in -1 on the end of structure URLs was fixed. Unfortunately it is still happening for my client. Thought I’d let you know (I can get you admin access if it’s helpful).

Thanks!

       
mrJones's avatar
mrJones
5 posts
15 years ago
mrJones's avatar mrJones

Bizarre, I am running Structure 1.3.1 on ExpressionEngine 1.6.8 and I just noticed urls appearing today with the -1 at the end. Hasn’t happened so far on a site I have been building. Will keep going and see if I there is a pattern, seems to be intermittent though.

       
Mark Croxton's avatar
Mark Croxton
319 posts
15 years ago
Mark Croxton's avatar Mark Croxton

I had a problem with the entries that are marked as ‘listing’ forgetting the selected weblog when you edit the entry. The solution to this is to edit structure_admin.tpl.php line 35, add:

if ($entry['listing_wid'] > 0)
{
$edit_url .= '&structure_listing_weblog='.$entry['listing_wid'];
}
       
Mark Croxton's avatar
Mark Croxton
319 posts
15 years ago
Mark Croxton's avatar Mark Croxton

Structure users may be interested in this new extension for Structure, which allows you to determine the default template for static child pages of entries within the page tree:

http://ellislab.com/forums/viewthread/131353/

       
Brett DeWoody's avatar
Brett DeWoody
140 posts
15 years ago
Brett DeWoody's avatar Brett DeWoody

One feature I wish Structure had was the ability to loop through sub-pages and spit out info and fields from the sub-pages. For example, let’s say I have a page titled Flooring, and it has sub-pages of Bamboo, Cork, Wood, etc. It would be helpful if in the Flooring template I could loop through the sub-pages (Bamboo, Cork, Wood, etc), and pull a description (or other field(s)) from each of those pages.

I’m looking into writing this add-on to structure, but thought I would toss this out to see if anyone has done this yet?

Thanks,

-Brett

       
Brett DeWoody's avatar
Brett DeWoody
140 posts
15 years ago
Brett DeWoody's avatar Brett DeWoody

Looks like this has been discussed over here - http://ellislab.com/forums/viewthread/123270/.

       
jtcc_webmaster's avatar
jtcc_webmaster
10 posts
15 years ago
jtcc_webmaster's avatar jtcc_webmaster

Has anyone had a PHP Notice of an undefined variable on line 262 of the mcp.structure.php? It has something to do with the output buffer and I can’t figure out why it would be undefined? I’m running 1.6.8 on IIS 7.0. Thanks!

       
Chuck Norton's avatar
Chuck Norton
106 posts
15 years ago
Chuck Norton's avatar Chuck Norton

Question: does anyone know a way/method to do the following:

  1. Create a listing on a static page through structure, then
  2. when clicking the ADD button from the structure page, it allowing you to edit the PARENT page.

As it is right now, when you click ADD it will make the URL look like it’s a child page, but it’s not actually part of the navigation. But (this is my current trick I have to do) if after saving that page you go back to edit it, it will in fact allow you to edit the parent page, and add it to the structure menu.

Anyone know a way to make this automatic, or at least the CHOICE for parent page available after clicking the listing ADD button?

Thanks in advance! PS - Though I really LOVE structure being free, I feel more & more that it could still be more awesome and even worth a few bucks. I’d definitely pay for it. Just an idea. Hope all the other dudes aren’t mad at me for suggesting it.

       
rockthenroll's avatar
rockthenroll
485 posts
15 years ago
rockthenroll's avatar rockthenroll

@bdewoody Definitely crucial and coming in the next version!

       
maodiddy's avatar
maodiddy
25 posts
15 years ago
maodiddy's avatar maodiddy

any update on when the next version is to be seen? very excited for it.

Also, quick question - when using Structure listings, how do I output a subnav of all the listing entries? It seems the nav_sub tag only works for the static structure entries.

       
First 62 63 64 65 66 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.