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

Plugin: Reeposition [Was MoveIt]

Development and Programming

Mr. Wilson's avatar
Mr. Wilson
131 posts
18 years ago
Mr. Wilson's avatar Mr. Wilson

MoveIt is now dead. In its place rises Reeposition 1.1. The documentation, such as it is, now reads:

This is a pretty simple plugin. Simply wrap the stuff you want to move like so:

{exp:reeposition}
  {exp:weblog:entries limit="1" weblog="weblog"}
    <h1>{title}</h1>
    {body}
    {reeposition:item}thing_you_want_to_move{/reeposition:item}
    {/exp:weblog:entries}
    
    ... Other stuff in your web page ...
    
    <div class="movedStuff">
        
            {reeposition:put_item}
        
    </div>
{/exp:reeposition}

If you want to move more than one item:

{exp:reeposition}
    {reeposition:item id="unique_id"}thing_you_want_to_move{/reeposition:item}
    {reeposition:item id="another_id"}another_thing_you_want_to_move{/reeposition:item}
    ... Other stuff in your web page ...
    
    <div class="movedStuff">
        
            {reeposition:put_item id="another_id"}
        
        
            {reeposition:put_item id="unique_id"}
        
    </div>
{/exp:reeposition}
       
Mr. Wilson's avatar
Mr. Wilson
131 posts
18 years ago
Mr. Wilson's avatar Mr. Wilson

Shoot, there was a typo in the version I just posted that caused some variables not to be replaced. We’ll just call that one a beta version, how ‘bout that? Anyway, it’s fixed now.

       
Adam Khan's avatar
Adam Khan
315 posts
18 years ago
Adam Khan's avatar Adam Khan

Cool idea for a plugin. Really need it for a site I’m currently working on. Thankee, Mr Wilson.

       
bobh's avatar
bobh
145 posts
18 years ago
bobh's avatar bobh

I think something’s wrong here. when ever I move something, the {reeposition:item} tags are still there. fe:

{exp:reeposition}
  {exp:weblog:entries weblog="reports"}
    {title}
    {reeposition:item}slurp{/reeposition:item}
    {/exp:weblog:entries}

{reeposition:put_item}
{/exp:reeposition}

outputs as:

pagination test {reeposition:item}slurp{/reeposition:item} slurp

I’m never gonna get that damned pagination moved now 😊

       
Mr. Wilson's avatar
Mr. Wilson
131 posts
18 years ago
Mr. Wilson's avatar Mr. Wilson

Are you running Reeposition 1.1?

       
bobh's avatar
bobh
145 posts
18 years ago
bobh's avatar bobh

yep

       
Mr. Wilson's avatar
Mr. Wilson
131 posts
18 years ago
Mr. Wilson's avatar Mr. Wilson

Well fiddle faddle. Let me explore the code a bit…

[time passes]

Dang bugs. Let’s give Reeposition 1.1.1 a try.

       
bobh's avatar
bobh
145 posts
18 years ago
bobh's avatar bobh

ok it works now. thanks for this great plugin.

oh I just noticed I can move stuff above item tags. and have multiple instances of the put_item… oh joy!

       
bobh's avatar
bobh
145 posts
18 years ago
bobh's avatar bobh

mr wilson, why doesn’t this code work?:

{exp:gallery:categories gallery="gallery" category="[b]{reeposition:put_item}[/b]"}
{category_row}{row}<a href="http://{category_path=gallery/thumbs}">See all pictures in this gallery.</a>{/row}{/category_row}
{/exp:gallery:categories}{/exp:weblog:entries}

is there any chance of creating this functionality in the nearby future?

       
Mr. Wilson's avatar
Mr. Wilson
131 posts
18 years ago
Mr. Wilson's avatar Mr. Wilson
mr wilson, why doesn’t this code work?

Well, it isn’t complete for one thing 😊 It doesn’t contain any {reeposition:item} pairs, or the {exp:reeposition} tags, for that matter. Can you post a more complete code segment, and a description of what you want to achieve?

       
bobh's avatar
bobh
145 posts
18 years ago
bobh's avatar bobh

um yeah, I left out all the code that precedes the put_item tags. as I said before, it works nicely, but I also want it to work within tags like exp:gallery:categories or exp:gallery:entries and so on.

       
Mr. Wilson's avatar
Mr. Wilson
131 posts
18 years ago
Mr. Wilson's avatar Mr. Wilson

That’s just a parse order thing. By default, plugins parse from the inside out. That is, plugins and modules inside the {exp:reeposition} tags will be parsed, then Reeposition will do its magic. What you want is the parse=”inward” parameter (an underutilized parameter, in my opinion). Like so:

{exp:reeposition parse="inward"}
  {exp:gallery:categories gallery="gallery" category="{reeposition:put_item}"}
    {category_row}{row}<a href="http://{category_path=gallery/thumbs}">See all pictures in this gallery.</a>{/row}{/category_row}
  {/exp:gallery:categories}
  {reeposition:item}my_category_name{/reeposition:item}
{/exp:reeposition}
       
maury.mccown's avatar
maury.mccown
87 posts
18 years ago
maury.mccown's avatar maury.mccown

It’s not doing anything for me. :(

I’m trying to move my Pagination links to a table along the bottom of my site:

{reeposition:item}
{paginate}
<div class="paginate">
<span class="pagecount">Previous posts: {current_page} of {total_pages} pages</span>{pagination_links}
</div>
{/paginate}
{/reeposition:item}

</div>
{/exp:weblog:entries}

And inside my table, I have:

{reeposition:put_item}
{/exp:reeposition}

Any ideas? My Pagination links are in the same place they always are, like nothing even happened.

       
Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

In the code you posted you are missing the opening tag:

{exp:reeposition}
       
Mr. Wilson's avatar
Mr. Wilson
131 posts
18 years ago
Mr. Wilson's avatar Mr. Wilson

Switch your code to this:

{paginate}
{reeposition:item}
<div class="paginate">
<span class="pagecount">Previous posts: {current_page} of {total_pages} pages</span>{pagination_links}
</div>
{/reeposition:item}
{/paginate}

</div>
{/exp:weblog:entries}

The Weblog module moves the pagination stuff before Reeposition does anything. That means that in your current setup your {reeposition:item} tags are empty by the time Reeposition runs. Make the change as noted above, and you should be golden.

       
1 2 3 4 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.