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

Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
16 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

That’s perfect Leevi. Thanks so much!

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

Sorry for the delays everyone. The past few weeks have been crazy. I swear to go through this thread and answer or provide support sometimes early next week. Thanks for your patience!

       
idfive's avatar
idfive
9 posts
16 years ago
idfive's avatar idfive

Thanks Travis!

I’m having an issue with version 1.2.7 and my nav_sub. The class “here” is being attached to my overview link regardless of whether or not you’re on the overview page.

Any ideas?

I rolled back to 1.2.4 and the problem disappeared. The plot thickens!

       
Michael Hahn's avatar
Michael Hahn
316 posts
16 years ago
Michael Hahn's avatar Michael Hahn
Hi Travis, I’m also getting the red ERROR message appear when trying to reorder pages as well. I’m on EE 1.6.7, Structure 1.2.7, your jQuery extension 1.1.2. Other than that I’m on a clean install, and don’t have masked CP or versioning enabled. Any ideas? Thanks in advance, Paul.

I am also having the issue, same specs as above. I did however replace the pages module, not sure if thats effecting it. But I can’t get my URL’s straight and I believe it has to do with this issue.

Thanks, any advise will help!!! My manuals are down :(

       
Michael Hahn's avatar
Michael Hahn
316 posts
16 years ago
Michael Hahn's avatar Michael Hahn

Just an update,

Everything is working properly, I sorted out the URL problem I was having. I still get the red Error when moving pages up and down in the CP but the order still works.

This is only happening on installs that were upgraded from the Pages module. On my installs that never used the pages module I do not get any errors.

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

Hi All… just came across an issue with the Structure module. Firstly, let me just say that the module rocks, and I use it now as standard on most EE sites I build.

The issue is around the Pagination function and Categories. The Pageination function actually seems to ignore the category parameter of the “weblog:entries” tag. The reason for this is the “Limit on category or category_group” section (around line 1218 of mod.structure.php).

This section adds “joins” into the for the categories table, but doesn’t actually do any limiting in the “WHERE” bit of the SQL. It needs to be updated to something like this (but this isn’t quite right!)…

// Limit on category or category_group
    if($params['category'] || $params['category_group']) {
       if((substr($params['category_group'], 0, 3) == 'not' OR substr($params['category'], 0, 3) == 'not') && $params['uncategorized_entries'] !== 'n')    {
           $sql .= " LEFT JOIN " . $db_prefix . "_category_posts ON entries.entry_id = " . $db_prefix . "_category_posts.entry_id
                              LEFT JOIN " . $db_prefix . "_categories ON " . $db_prefix . "_category_posts.cat_id = " . $db_prefix . "_categories.cat_id";
        $where_clause .= " AND " . $db_prefix . "_categories.cat_id = ".$params['category']." ";
       }    else {
           $sql .= " INNER JOIN " . $db_prefix . "_category_posts ON entries.entry_id = " . $db_prefix . "_category_posts.entry_id
                              INNER JOIN " . $db_prefix . "_categories ON " . $db_prefix . "_category_posts.cat_id = " . $db_prefix . "_categories.cat_id";
        }
        $where_clause .= " AND " . $db_prefix . "_categories.cat_id = ".$params['category']." ";
    }

The “$where_clause” part is missing from the official release (again, my version isn’t quite right!!).

Just one other thing… the Pagination function doesn’t respect the {no_results} weblog tag as well. Not sure how to fix this one!

Cheers.

Andrew…

       
rick.prince's avatar
rick.prince
111 posts
16 years ago
rick.prince's avatar rick.prince

Fairly specific request, so I know I’ll have to hack mod.structure.php, but how can I add the number next to each main_nav li? Eg:

<li>{count}. {title}</li>

Thanks!

       
jogillesp's avatar
jogillesp
1 posts
16 years ago
jogillesp's avatar jogillesp

Hey! Thanks for the module! I am having a problem with pagination. When I click the next button, the URL changes properly, but my list doesn’t show the next batch of items. I did find, however that if I add index.php directly after the site_url, it works (i.e. www.mysite.com/index.php/news/?page=2).

       
kundi's avatar
kundi
23 posts
16 years ago
kundi's avatar kundi

Hello,

Im having problems with exp:structure:nav_main tag. It wont show the defined sublevels in navigation. The code I use: {exp:structure:nav_main show_level_classes="yes" exclude_status="hidden|no_main_nav"}

I want to output all levels of navigation (similar as sitemap). Is it possible to do that with some of the tags and still have ‘here’ class on the active page?

Any idea? Thanks for help!

       
salbertson's avatar
salbertson
29 posts
16 years ago
salbertson's avatar salbertson

First off, thanks for the great module.

I am having trouble trying to set the “start_from” param for the nav_sub tag to the current page’s parent. Basically I want to always start the sub_nav one level up from where I am currently at in the structure.

I am trying to use the code below without any luck. It looks like the structure tag is parsed before the PHP or something. Is there another way to get what I need with purely structure module tags? Any help would be greatly appreciated, thanks.

<?php
// get uri
$uriArray = explode('/', $_SERVER['REQUEST_URI']);

// lop off last uri segment
$uriArray = array_slice($uriArray, 0, (sizeof($uriArray) - 2));

// convert back to string
$uriString = implode('/', $uriArray);

//echo $uriString;
?>

<div id="page-sidebar">
{exp:structure:nav_sub start_from="<?php echo $uriString; ?>"}
</div>
       
kundi's avatar
kundi
23 posts
16 years ago
kundi's avatar kundi
First off, thanks for the great module. I am having trouble trying to set the “start_from” param for the nav_sub tag to the current page’s parent. Basically I want to always start the sub_nav one level up from where I am currently at in the structure. I am trying to use the code below without any luck. It looks like the structure tag is parsed before the PHP or something. Is there another way to get what I need with purely structure module tags? Any help would be greatly appreciated, thanks.
<?php
// get uri
$uriArray = explode('/', $_SERVER['REQUEST_URI']);

// lop off last uri segment
$uriArray = array_slice($uriArray, 0, (sizeof($uriArray) - 2));

// convert back to string
$uriString = implode('/', $uriArray);

//echo $uriString;
?>

<div id="page-sidebar">
{exp:structure:nav_sub start_from="<?php echo $uriString; ?>"}
</div>

Use {segment_1}, {segment_2}, etc. instead of php code.

       
salbertson's avatar
salbertson
29 posts
16 years ago
salbertson's avatar salbertson
Use {segment_1}, {segment_2}, etc. instead of php code.

The number of segments will change the deeper in the structure I go. How can I get all the segments except for the current one?

       
nomolos's avatar
nomolos
24 posts
16 years ago
nomolos's avatar nomolos

Edit: Whoops, found a bug in my bugfix. Fixed now.

Found a bug in the pagination function. The ‘show_expired’ SQL clause is the wrong way.

Lines 997-1000 of mod.structure.php:

// Limit by show_expired
if(!$params['show_expired'] || $params['show_expired'] == 'no') {
    $where_clause .= " AND (FROM_UNIXTIME(entries.expiration_date) > UTC_TIMESTAMP() OR entries.expiration_date = 0)";
}
       
rockthenroll's avatar
rockthenroll
485 posts
16 years ago
rockthenroll's avatar rockthenroll

I’m beginning to go through this thread, but will be a bit longer to get back. I’ll need info from everyone to help debug, so PM me if you need help, otherwise I’ll hit you up soon. Sorry again for the delay - work and a death in the family.

       
nomolos's avatar
nomolos
24 posts
16 years ago
nomolos's avatar nomolos

Another fix that may have come up earlier from the pagination. Around line 1067 (right after the

(if ($params['status'])

bit), add the following:

else {
    $where_clause .= " AND entries.status IN ('open')";
}

otherwise if you don’t have a status it select everything (even closed). As well, Travis, I’ve gotten “display_by” support hacked into the pagination stuff for Structure, although you have to be a bit specific in your exp:weblog:entries parameters (due to EE limitations). PM me if you’d like the code - it’s a bit too large to post here.

       
First 45 46 47 48 49 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.