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

Reeposition: I must have something nested wrong here?

Development and Programming

Deron Sizemore's avatar
Deron Sizemore
1,033 posts
17 years ago
Deron Sizemore's avatar Deron Sizemore

With the site I’m working on, I’m going to display “newer - older” pagination at the bottom of some entires on the homepage.

Here is the code I’m using:

<div id="main-content">
                <h2>Gallery</h2>
                <ul id="gallery" class="clearfix">
                    {exp:reeposition}

                    {exp:weblog:entries weblog="gallery" limit="2" disable="member_data|trackbacks" paginate="bottom"}
                    <li class="{switch="left|right"}">

                    <a href="http://{site-url}" title="{title}">{image}</a>
                    <a href="http://{site-url}">{title}</a>
                    {entry_date format="%M %d, %Y"}
                    
                    <?php echo rating_bar({entry_id},'5'); ?>
                    </li>
                    
                    {reeposition:item}
                    {paginate}
                    <div id="newer-older" class="clearfix">
                        {if next_page}
                        <a href="http://{auto_path}"><span class="arrow">«</span> Older</a>
                        {/if}

                        {if previous_page}
                        <a href="http://{auto_path}">Newer <span class="arrow">»</span></a>
                        {/if}
                    </div>
                    {/paginate}
                    {/reeposition:item}

                                   {/exp:weblog:entries}
                </ul>
                    
                {reeposition:put_item}

                {/exp:reeposition}
            </div>

The pagination has to be within the weblog entries tag to work, but with the pagination inside of the weblog entries tag, that means that it’s also inside of the <ul> tag which makes the pagination not display correctly in IE7. The pagination needs to be outside of the <ul> tag to work right.

So, I’m wondering is there a way nest it differently so that the pagination sits outside of the <ul> tag? If not, what’s the problem with the reeposition tags that I’m using? I’m trying to just use that plugin to reposition the pagination outside of the <ul> tag, but that doesn’t see to be working either?

Thanks

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

Deron, are you trying to do next/prev entries? Or are you spanning a single entry across multiple pages? Or are you on a multiple entry page trying to go to the next set of entries? I can’t really tell from your code. What is the URL where this is happening?

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
17 years ago
Deron Sizemore's avatar Deron Sizemore

Lisa,

Yes, I’m just trying to do next/previous entries.

Here is the homepage where it’s happening: http://www.nicestylesheet.com/blog

I basically just need to figure out a way to move the pagination (next/previous) outside of the </ul>. If you look at the page in IE7 you’ll notice that the next/previous is pushed over to the right. I’m fairly certain this is because it’s nested inside of the <ul> instead of outside the <ul>

Thanks

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

Ok, well, the code you’re using is for spanning an entry across multiple pages. The proper next/prev entries does not get nested. =)

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
17 years ago
Deron Sizemore's avatar Deron Sizemore

Lisa,

I’m not sure that’s what I need either. Maybe you can confirm, but it says on the link that you gave me that

“these links can only be used on pages displaying a single entry, such as a “comment” page”

This isn’t a “single entry” page. This page is set up the same way someone would set up a multiple entries page on a weblog. Will this still work?

I still think what I need is the pagination. Weblog Entry and Comment Pagination seems to be what I need (and is what I’m currently using) but it’s nested inside of the weblog entry tag (which I can’t have)

Thoughts?

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

You’re right, Deron; my apologies for that. I had just forgotten about the previous and next page functionality of that type of pagination!

So the problem is, essentially, a problem with Reeposition, is that right? if so, I’ll need to move this down to the plugins forum.

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
17 years ago
Deron Sizemore's avatar Deron Sizemore

No problem at all.

Well that’s what I didn’t know I guess.

I don’t think there’s a problem with reeposition per say, but maybe a nesting problem with the weblog entries tag or something else on the page making the reeposition not work?

I don’t know how experienced you are with reeposition, but from my code, does everything looks like it ‘should’ work?

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
17 years ago
Deron Sizemore's avatar Deron Sizemore

Ah Ha! Got it!

I went poking around the “moveit” thread which was the old name of reeposition and actually found my answer. It was in fact a nesting problem. The reeposition tags should be inside of the {paginate} tags not outside of them.

Thanks Lisa

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

I’m going to move this to satisfy my moderating needs; but as a note - I have 0 experience with Reeposition. Posting in the plugin forums lets you find people that have the knowledge of those third-party addons. =)

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
17 years ago
Deron Sizemore's avatar Deron Sizemore

Thanks Lisa. The plugin forum is the best place for this now that I know what the problem was. I wasn’t sure when I first posted. 😊

       

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.