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

Martin Luff's avatar
Martin Luff
52 posts
16 years ago
Martin Luff's avatar Martin Luff

Hi Peter Baker

I believe Travis may have answered this one already - http://ellislab.com/forums/viewthread/91290/P378/#538899 I haven’t tried SAEF with Structure but it sounds like if you set up the weblog in question as an Asset in Structure then it should work… Hope that helps. Regards, Martin

       
Peter Baker's avatar
Peter Baker
49 posts
16 years ago
Peter Baker's avatar Peter Baker

Martin, thanks for pointing that out. I thought I had read through all of these (23) pages, but I missed that.

I can understand the main “Page” sections of Structure not being enterable by the SAEF, since they’re meant to be stand alone pages in a heirarchy, but “Listing” weblogs seem to me like prime candidates for something like the Stand Alone Entry Form. I get that the Assets paradigm works fine for them in this case, but from a backend UI perspective, having the entries nested under the section they’re related to feels more right.

Either way, just glad to have figured out why things seemed so weird. Having a blank page with no error show up or get logged was getting really painful.

       
vik407's avatar
vik407
15 posts
16 years ago
vik407's avatar vik407

A note about this great module:

Our site is structured and multidomain/multilanguage and when our staff check and play with the settings in a a completed structured site (200+ pages) and hit the settings/weblog/type and change from structure to asset without much thinking (!) result: all the structure data is gone without notice or alerts. Thanks god for cron db backups all configuration can be restored i think an alert can be triggered if structure data already exist in the db.

Great module. i post other tips and thougths about structure when finishing the site.

       
Martin Luff's avatar
Martin Luff
52 posts
16 years ago
Martin Luff's avatar Martin Luff

@Peter - you’re welcome.

Travis, I wonder if some of the points and your answers from these posts could go in the manual?

All the best - Martin

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

I’m really wanting to use this module, but I’m nervous. I’m building a site that we are intending to migrate to 2.0 when it comes out - I’m nervous that all my time and effort using Structure would mean I will have to basically re-code the entire site when 2.0 comes out (it looks like it intends to do basically what Structure is doing now by default).

Any thoughts? Are you planning on upgrading this to work with EE 2.0 - yes, maybe, no? If 2.0 really does do basically the same things as you’re doing, will that mean it stays an EE 1.x module only?

Thank you - this would make my life so much easier!

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

Holy &*$#! Nice Module! This is how EE should work out of the box - I can’t tell you how much happier my clients will be with this in place instead of using categories to configure their navigation.

One question. I want to have the {exp:structure:nav_sub} surrounded by some HTML, but ONLY if there is going to be a subnav generated. If there is no subnav then I don’t want that HTML on the page. How would you go about doing that (sorry if this was asked previously - I don’t have time to skim all 23 pages)?

Thank you, thank you, thank you for this! The other options to this were so limited or annoying that I decided to just take the plunge and deal with 2.0 when it comes out (all the content will still be there even if this module isn’t).

       
vik407's avatar
vik407
15 posts
16 years ago
vik407's avatar vik407

@ brian We are prudent early adopt any new version of software. These upgrades requires training: editors, designers, publishers and system administrators, not just modules plugins or templates. Because that in complex or enterprise websites we think using EE2 at least one years after its launch.

With new customers we adopt EE2 as soon as it becomes available. Train people, designers, publishers, editors and ourselves from that point its a good idea.

About structure on the new version of EE: I know Ellislab is calling for actual developers to code and design modules for the new version. We can ask Travis Schmeisser if structure was included in that program to get a compatible version for EE2 from launch time?. Greetings.

       
Martin Luff's avatar
Martin Luff
52 posts
16 years ago
Martin Luff's avatar Martin Luff

@vik407 - ayeeee - you’re going to give me bad dreams!

Our site is structured and multidomain/multilanguage and when our staff check and play with the settings in a a completed structured site (200+ pages) and hit the settings/weblog/type and change from structure to asset without much thinking (!) result: all the structure data is gone without notice or alerts.

A timely reminder on backing-up, client training and locking down permissions carefully I think…

Regards - Martin

       
vik407's avatar
vik407
15 posts
16 years ago
vik407's avatar vik407

@martin yep i think getting the things further about the loss of data for production enviroment and disable all delete commands in the file “modules/structure/mcp.estructure.php” to prevent this bug. Open the file in line 194 and you get the point. After that, sleep like a baby waiting for a new structure version 😉

       
Martin Luff's avatar
Martin Luff
52 posts
16 years ago
Martin Luff's avatar Martin Luff

Thanks Victor - here’s sleeping like a baby (and definitely looking forward to next release) 😊

       
dj-rowan's avatar
dj-rowan
30 posts
16 years ago
dj-rowan's avatar dj-rowan

Status parameter interfering with Structure Pagination I am having a problem with pagination and structure. I recently added a custom status group and added a status “Home Page Display” which essentially makes things ‘sticky’ on the home page, so news items I want to feature can stay featured, without some of the limitations of being ‘sticky’. I also created a status “Home Page Hide” to do the opposite- remove items that I don’t want displayed on the home page.

On my general ‘Articles’ page, I am using structure to make this page list all of my articles. I have noticed, however, that neither my ‘Home Page Display’ or ‘Home Page Hide’ articles are displaying in the listing. I tried to add a status parameter to the entries tag:

{exp:structure:paginate parse="inward" location="both" show_page_total="yes" first="<" mode="jumping" last=">" previous="prev" next="next"}
    {exp:weblog:entries weblog="articles" dynamic="off" orderby="entry_date" sort="desc" limit="5" status="Home Page Display|Open|Home Page Hide"}    
        >>>> stuff >>>>                                                   
    {/exp:weblog:entries}        
{/exp:structure:paginate}

This shows me the articles with statuses I want, but I loose my pagination.

Anyone have any ideas why this may be? Leaving status=”” or omitting the parameter show pagination properly- just no articles with status != ‘open’.

Thanks!

rowan

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

Hey everybody - sorry for the delays on answers. I’m in Austin for SXSW and was slammed with work before leaving. I promise proper replies and as much help as possible within the next few days. Thanks for your patience!

       
Andrew Gunstone's avatar
Andrew Gunstone
101 posts
16 years ago
Andrew Gunstone's avatar Andrew Gunstone

Hi all,

This is a fantastic module. That said… I do seem to be having a problem with the “pagination” feature. When I try using it, I get the following error:

Warning: Division by zero in /Library/WebServer/system/modules/structure/mod.structure.php on line 906

I have tracked this error to $per_page not being set on line 903 (so therefore it is an empty variable).

I have also tracked back to line 608 to the following foreach statement:

foreach($TMPL->var_pair as $pkey => $pval) {
        // Find weblog:entries tag
        if( ereg("^exp:weblog:entries", $pkey) ) {
            $params = $pval;
            $params['offset'] = $params['limit'] * ($current_page - 1);
            
            // Replace the offset value with the calculated one
            // if offset value present
            if( ereg("offset=\"([0-9]+)\"", $pkey) ) {
                $tagdata = preg_replace('/(\{exp:weblog:entries)(.+)offset="([0-9]+)"(.*\})/', '$1$2offset="' . $params['offset'] . '"$4', $tagdata);
            } else {
                $tagdata = preg_replace('/(\{exp:weblog:entries)(.+)(.*\})/', '$1$2 offset="' . $params['offset'] . '"$3', $tagdata);
            }
        }
    }

Essentially it is not getting into the foreach statement AT ALL (tested by putting an “echo ‘here’” before and in the foreach statement). Infact, doing a “print_r” on “$TMPL->var_pair” returns nothing! Doing a count on it returns 0 as well.

I have the latest version installed, and the extension and module installed correctly. jQuery is also turned on. I don’t think that I need to do anything else??

My code for testing the actual pagination is (I have kept it simple for testing!):

{exp:structure:paginate parse="inward"}
    {exp:weblog:entries weblog="blog" dynamic="off" limit="5"}
        {title}    
    {/exp:weblog:entries}
{exp:structure:paginate}

Does anyone have any ideas what is going on? Do I need to turn anything else on or off in the CP?

Cheers.

       
Andrew Gunstone's avatar
Andrew Gunstone
101 posts
16 years ago
Andrew Gunstone's avatar Andrew Gunstone

Ignore my previous post. Turns out I stuffed up the closing tag… forgot the forward slash!! Doh.

Works perfectly!

😊

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

What happens when you try to run this on a server pre-PHP 5.2? I just realized that the EngineHosting account we’re using is on 5.1.6 (at least on the server we’re currently on). I get a 404 for any page other than the home page, and I’m trying to figure out if that is related to this problem, or if I’ve got something else going on as well.

Thanks for any insight.

Just wanted to update: Currently EH doesn’t appear to have plans to update to 5.2, so if you’re on EngineHosting, don’t use this module. Bummer :(

       
First 26 27 28 29 30 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.