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

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

@Matthew Entries not associated with Structure probably don’t have either assigned - are you sure those entries have been saved since Structure was installed so that they’ve had that info created?

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

@rockthenroll - now worries re the code. I am sure you can tidy it up a bit if you want to use it… plus we could also add in some more parameters (i.e. status, etc), but it suits my needs for now.

Feel free to use it as you see fit!

😊

       
aimelise's avatar
aimelise
31 posts
15 years ago
aimelise's avatar aimelise

Hello. The Structure posts in this forum are all over the place, but the core Structure answers seem to be in this thread.

I’m having an issue w/ pagination and my .htaccess file. I’m not using LG’s Site Access Generator. I’ve tried two methods. First “File and Directory Check” method and the second “Include/Exclude.” I posted my issue here and am hoping someone might have a suggestion.

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

Hi Aimelise,

Did you try removing the “?” from the line:

RewriteRule ^(.*)$ /index.php?$1 [L]

…as suggested by ngenworks?

If you don’t remove it, then the URL the browser looks at ends up something like this:

http://www.mydomain.com/index.php?/mygroup/mytemplate/?page=2

As you can see there are now 2 question marks in the URL which is not allowed.

I find that removing the question mark usually works for me.

Further to that… here is the .htaccess file that I use on pretty much all my sites, which are hosted at MediaTemple…

ErrorDocument 404 /site/404/
DirectoryIndex index.php

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteRule ^\.htaccess$ - [F]
AddHandler php5-script .php

Hope that helps.

Cheers.

       
jtnick's avatar
jtnick
29 posts
15 years ago
jtnick's avatar jtnick

Does anyone have recommendations for previewing entries before publishing, when using a system like Structure? I’m curious as to how this could be setup.

Could one use Live Look or LG Live Look? I didn’t think this would be possible though, given Structure’s replacement of the /template group/template/ hierarchy.

I’ve looked through this thread, but haven’t found much information on the topic.

       
Peter Baker's avatar
Peter Baker
49 posts
15 years ago
Peter Baker's avatar Peter Baker
I had a bit of a need to create a simple “Next/Previous Entry” type thing for use with some News pages that I had listed under the Structure module. The problem with the built in EE next/previous entry is that you couldn’t use the {page_url} variable. So I have created a little function that helps with that. Basically what it is good for is when you have setup something like a News weblog to sit as a listing weblog under the News page.
$weblog_id = $node['listing_wid'];
    
    $sql = "SELECT entry_id, title 
            FROM `exp_weblog_titles` 
            WHERE weblog_id = $weblog_id
                AND status = 'open' 
            ORDER BY entry_date $type";

I needed the same thing, but for not for listing entries. By modifying your query there, I was able to do the same thing for regularly nested child pages.

$weblog_id = $node['weblog_id'];
$parent_id = $node['parent_id'];
    
$sql = "SELECT titles.entry_id, titles.title 
    FROM exp_weblog_titles as titles, exp_structure as structure
    WHERE titles.weblog_id = $weblog_id
        AND titles.status = 'open'
        AND structure.parent_id = $parent_id
        AND structure.entry_id = titles.entry_id
    ORDER BY entry_date $type";

Can’t wait for Structure 2!

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

Ooooh… fancy fix Peter. Good stuff.

😊

       
Adrienne L. Travis's avatar
Adrienne L. Travis
213 posts
15 years ago
Adrienne L. Travis's avatar Adrienne L. Travis

Yaaargh. We just started getting the dreaded red ERROR on drag-and-drop after installing MSM.

Here’s what i can tell you:

  • we use LG .htaccess Generator to remove the index.php, and we have the home page listed as blank in site settings
  • the permissions on the module and extension are 755 as appropriate
  • Firebug says the called ajax page is returning a 200 (OK)

For some reason Structure seems to be making the request cross-domain (per Firebug) – not to the main control panel URL but to the URL of the individual site. So my control panel is at

http://www.domain1.com/system/

with two sites, call them domain2.com and domain3.com

When Structure is dragging and dropping in the Domain2 site, it’s calling

http://www.domain2.com/index.php?ACT=20…etc.

I’m GUESSING this is the issue with the drag-and-drop – anyone have a fix?

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

@Nathan Pitman (Nine Four)

It would be neat if there was a FieldFrame field type that allowed you to select multiple ‘related’ pages from your site using a multi line select to be spat out in a unordered list in the current page. Just sayin. wink

This FF extension will allow you to relate structure entries: http://ellislab.com/forums/viewthread/131174/

You could adapt it to output a multiselect menu or checkbox list quite easily.

@rockthenroll

@Nathan @mikec964 @Mark Croxton - I haven’t seen this issue if anyone can give me access to where it’s happening I’ll take a look. Looking into the code sent as well, but like I said unaware that there’s even an issue and I can’t replicate this.

To replicate the ‘forgetting weblog’ bug: * Manage two or more weblogs with structure * Don’t assign all of them to listing entries, i.e. you have one or more unassigned weblogs * Click to edit an entry that has been assigned as a listing entry * On the entry edit form the weblog select menu defaults to the first weblog in the list, instead of the previously assigned weblog being selected.

My fix works by appending the weblog id as an argument to the edit entry links.

       
Hue Labs's avatar
Hue Labs
31 posts
15 years ago
Hue Labs's avatar Hue Labs

Let’s say I am in a section like this:

Home About - Team - Company (here) - Area Portfolio Contact Us

If I use the following code:

{exp:structure:nav_sub exclude_status="hidden" start_from="/about/"}

Shouldn’t I get an output like this, notice the “start_from” parent shows:

<ul id="nav-sub">
  <li class="sub-level-0 parent-here"><a href="/about/">About</a>
    <ul>
      <li class="sub-level-1"><a href="/about/team/">Team</a></li>
      <li class="sub-level-1 here"><a href="/about/company/">Company</a></li>
      <li class="sub-level-1 last"><a href="/about/area/">Area</a></li>
    </ul>
  </li>
</ul>

I thought that was the case. However, I came to my site today the “start_from” parent is not outputting anymore, and I have no idea why. It literally occurred over night and I am baffled.

Here’s what I am getting now:

<ul id="nav-sub">
  <li class="sub-level-0"><a href="/about/team/">Team</a></li>
  <li class="sub-level-0 here"><a href="/about/company/">Company</a></li>
  <li class="sub-level-0 last"><a href="/about/area/">Area</a></li>
</ul>
       
rockthenroll's avatar
rockthenroll
485 posts
15 years ago
rockthenroll's avatar rockthenroll

Loving the new pagination tags!

@misterKeebles Previewing wouldn’t really work the same since it’s not template_group/template

@Adrienne L. Travis Was this working before?

@Mark Croxton Thanks, I’ll test. You have a fix for it? Email me please!

@Hue Labs start_from only shows what’s under that node, if you want to include something you need to go a level up.

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

Would anyone know just glancing at this code how I could modify it so it will Exclude certain status’s (at least “hidden”)?

I posted this a few weeks ago for my DropDown menu with structure: http://ellislab.com/forums/viewthread/91290/P936/#646266

Thanks!

       
Pete Eveleigh's avatar
Pete Eveleigh
31 posts
15 years ago
Pete Eveleigh's avatar Pete Eveleigh

I need to do the same as what I think Hue Labs is doing.

I’m trying to work out a way to show top level “pages” with 1 sublevel output as a nested, unordered list. I thought I could do this with

{exp:structure:nav_sub start_from="/"}

This doesn’t work and the only way I seem to be able to get top level pages out is to use nav_main but this won’t let me show any sub pages.

Has anybody got a suggestions as to how I might achieve this?

       
Hue Labs's avatar
Hue Labs
31 posts
15 years ago
Hue Labs's avatar Hue Labs

Yes Pete, exactly. I somehow had this working previously with the parent node (sub-level-0) nesting down to the sub nav children (sub-level-1, sub-level-2, etc). However, it just quit working for me the other day and honestly can’t remember if how I did it (hacked in Structure?).

       
chichilatte's avatar
chichilatte
43 posts
15 years ago
chichilatte's avatar chichilatte

Hi, new to Structure, looks excellent but I have one question:

Is there no way Structure can ask you what kind of page you want to create when you click “Add page”? Adding a page with the exact same fieldgroup as its parent is, well, kind of useless, right?

       
First 66 67 68 69 70 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.