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

Kevin Evans's avatar
Kevin Evans
222 posts
about 16 years ago
Kevin Evans's avatar Kevin Evans

Hello again,

I am having a problem with the paginate feature.

I have this code:

{exp:structure:paginate parse="inward"}
{exp:weblog:entries limit="2" weblog="{mysection2}" dynamic="off" disable="categories|category_fields|member_data|trackbacks|comments" rdf="off"}
{artwork_upload}
<div class="art-image"><a href="http://{page_uri}">{exp:imgsizer:size src="{art_image}" auto="165" alt="{title}"}</a>
<a href="http://{page_uri}">{title}</a>
</div>
{/artwork_upload}
{/exp:weblog:entries}
{/exp:structure:paginate}

The page in question is http://www.amaruspirit.org/artwork/

THe problem is that the next and previous dont work. I have 4 images and when I hit next it stays on the same 2 images.

http://www.amaruspirit.org/artwork/

Any ideas? I am using the latest structure with 1.6.8 Expression Engine.

Thanks

Update: this is in a Matrix field.

       
Kevin Evans's avatar
Kevin Evans
222 posts
about 16 years ago
Kevin Evans's avatar Kevin Evans

Here’s the full template of my listing page template.

{assign_variable:mysection="static_content"}
{assign_variable:mysection2="art"}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html >
<head>
    {exp:weblog:entries dynamic="off" limit="1" require_entry="yes" url_title="{segment_2}" weblog="{mysection}" disable="pagination|categories|category_fields|member_data|trackbacks|comments"}{exp:lg_better_meta_pi:template entry_id="{entry_id}" title="{title_landing}"}{/exp:weblog:entries}
    

{embed="embeds/.html_head"}


</head>

<body class="inner">

{embed="embeds/.header"}

{exp:weblog:entries limit="1" require_entry="yes" weblog="{mysection}" disable="categories|category_fields|member_data|trackbacks|comments" rdf="off"}
{if no_results}{redirect="404"}{/if}

     <div id="main-heading-wrapper">
     <h1>{title}</h1>
     
     </div>
        
  <div class="main-content">
      
    <div class="span-6 append-1 hpcol main-col">
    

{content_static}

{/exp:weblog:entries}




{exp:structure:paginate parse="inward"}
{exp:weblog:entries limit="2" weblog="{mysection2}" dynamic="off" disable="categories|category_fields|member_data|trackbacks|comments" rdf="off"}
{artwork_upload}
<div class="art-image"><a href="http://{page_uri}">{exp:imgsizer:size src="{art_image}" auto="165" alt="{title}"}</a>
<a href="http://{page_uri}">{title}</a>
</div>
{/artwork_upload}
{/exp:weblog:entries}
{/exp:structure:paginate}


    
    </div>
    <div class="span-6 append-1 hpcol side-col">
    
    
 {embed="embeds/.sidecol"} 
        
        </div>
    
  </div>
  </div>

</div><!--/content-->
</div><!--/headimg-->
</div><!--/container-->
{embed="embeds/.footer"}

Here’s the screenshot of my Structure admin area:

http://idisk.me.com/kevans/Public/Pictures/Skitch/Dreamweaver-20090824-021757.jpg

Basically I have a static weblog that has the entry Artwork, then my art single entries uses the art weblog.

Any ideas why the pagination doesnt work?

THanks!

       
Kevin Evans's avatar
Kevin Evans
222 posts
about 16 years ago
Kevin Evans's avatar Kevin Evans

Anyone have any advice on a solution to my pagination issue?

Thank you

Kevin

       
Dennis Frank's avatar
Dennis Frank
12 posts
about 16 years ago
Dennis Frank's avatar Dennis Frank

Hello,

Is there anything new on using Structure and LG Live Look in tandem?

Thanks!

       
jeremydouglas's avatar
jeremydouglas
292 posts
about 16 years ago
jeremydouglas's avatar jeremydouglas
@rick.prince orderby=“structure” is not available…YET

Does anyone have thoughts on a custom query to do this? I just need to return weblog entries with some custom fields.

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

@Mark Croxton - Thanks for the feature requests!

@Kevin Evans - looking into pagination issues for the next version, some conflict has risen.

@jeremydouglas - orderby=”structure” will be in the next version!

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

Is there a workaround for pagination in the meantime? Really really need that to work…

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

@Kevin Evans + @maodiddy Check your PMs

       
Jason Morehead's avatar
Jason Morehead
454 posts
15 years ago
Jason Morehead's avatar Jason Morehead

I’m not sure if this has been mentioned before – if it has, my apologies – but I’ve encountered something that seems like a bug/inconsistency to me.

When I set the {exp:structure:nav_sub} tag’s “show_overview_link” parameter to “yes”, it adds a “here” class to the “Overview” link as well as the currently selected link if that is something other than the “Overview” link, like so:

<ul id="nav-sub">
    <li class="sub-level-0 here"><a href="/foo/">Overview</a></li>
    <li class="sub-level-0"><a href="/foo/page1/">Page #1</a></li>
    <li class="sub-level-0 here"><a href="/foo/page2/">Page #2</a></li>
    <li class="sub-level-0"><a href="/foo/page3/">Page #3</a></li>
</ul>

In the above example, I’m actually on “Page #2”, but the “here” class appears on “Overview” as well as “Page #2”. Which isn’t right, because I’m (obviously) not on both pages.

Additionally, if you’re using the “here” class to apply some additional CSS styling to the currently selected menu link, you’ll end up with a menu that has two highlighted items.

       
Kevin Evans's avatar
Kevin Evans
222 posts
15 years ago
Kevin Evans's avatar Kevin Evans

Question….if I am making a gallery to show art, do you think this should be a structure listing or just static structure pages? Do I use the regular EE next previous links for the single entry pages or do I use the structure pagination feature?

I noticed that when using the structure pagination it adds like ?page=5 to the end of the url. Is that normal?

Thanks

       
joninnz's avatar
joninnz
6 posts
15 years ago
joninnz's avatar joninnz

I have structure 1.3.0 installed and have been playing around with it. Nice work by the way! I was just wondering how I might be able to list entries from a weblog used in structure (child elements) in the same order as they appear in the navigation.

The “case studies” listing page I’m working on requires a list of entries with a little photo attached. How can I go about implementing this using the structure setup?

It would be nice if weblog entries had some kind of index associated with structure.

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

@Jason Morehead There will be a minor bug fix release soon including this issue.

@Kevin Evans If you want next/prev on a detail page you’ll need to switch to using the normal templating engine for this area. That way, authors have the simple Structure interface, but you can feed them to the front-end however you choose. yes that URL is normal and how we have pagination working right now.

@joninnz ordering by Structure is coming in the next major version release. Check out nGen file field for the photo bit.

       
zdenkov's avatar
zdenkov
2 posts
15 years ago
zdenkov's avatar zdenkov

Hi,

nav_sub shows siblings if no child.

My structure is: * top parent -parent 1 –child 1.1 —child 1.1.1 —child 1.1.2 –child 1.2 —child 1.2.1 -parent 2 –child 2.1 -parent 3 * top parent …

For my subnavigation I want to show everything from third level (e.g. only childs of the parent): {exp:structure:nav_sub start_from="/{segment_1}/{segment_2}”}

This works fine for /top parent/parent 1/, /top parent/parent 1/child 1.1/ … /top parent/parent 1/child 1.1/child 1.1.1/ But, when I have /top parent/parent 3/ as a result I get: <ul> <li>parent 1</li> <li>parent 2</li> <li>parent 3</li> </ul>

I experimented with show_depth and limit_depth, but no luck.

Any ideas?

kind regards,

z.

       
zdenkov's avatar
zdenkov
2 posts
15 years ago
zdenkov's avatar zdenkov

Just found one solution to my problem. In file mod.structure.php somewhere at line 555 there is

if($node['isLeaf']) { ....

I’ve changed this line to

if($node['isLeaf'] && !$fixed) { ....

So far it didn’t break anything.

z.

       
VRDL's avatar
VRDL
23 posts
15 years ago
VRDL's avatar VRDL

I’ve removed the silly error_reporting-disabling feature of the structure module, but now it throws some errors:

Notice: Undefined variable: weblog_not in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1029

Notice: Undefined index: author_id in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1033

Notice: Undefined index: username in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1044

Notice: Undefined index: entry_id in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1055

Notice: Undefined index: entry_id_from in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1070

Notice: Undefined index: entry_id_to in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1075

Notice: Undefined index: group_id in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1080

Notice: Undefined index: show_expired in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1095

Notice: Undefined index: stop_before in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1110

Notice: Undefined index: year in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1115

Notice: Undefined index: status in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1144

Notice: Undefined index: url_title in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1167

Notice: Undefined index: search in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1224

Notice: Undefined index: category in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1269

Notice: Undefined index: category_group in /*****/httpdocs/systeembeheer/modules/structure/mod.structure.php on line 1269

These are pretty straightforward errors and can be easily fixed with an isset() statement.

       
First 54 55 56 57 58 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.