@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
@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.
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
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!
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'];
}
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
Question: does anyone know a way/method to do the following:
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.