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

Deron Sizemore's avatar
Deron Sizemore
1,033 posts
about 18 years ago
Deron Sizemore's avatar Deron Sizemore

Nice! Thanks for this plugin. Works great for what I needed!

       
mx3design's avatar
mx3design
15 posts
17 years ago
mx3design's avatar mx3design

Thank you! Very helpful.

       
Amyloo's avatar
Amyloo
5 posts
17 years ago
Amyloo's avatar Amyloo

Thanks so much for this, Mr. Weelson. The paginate positioning alway drives me nuts. Now, no more.

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

It looks to me like you are trying to simulate behavior already provided by the related_categories_mode parameter:

{exp:weblog:entries weblog="foods"}
...whatever content you want in here...
{/exp:weblog:entries}    
<DIV class="related">
<UL>
{exp:weblog:entries weblog="foods" related_categories_mode="on"}
<LI><a href="http://{comment_url_title_auto_path}" title="{title}">{title}</a></LI>
{/exp:weblog:entries}
</UL>
</DIV>

Are you doing something different than what that parameter can offer?

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

I think you’ll need an embed for what you want to do. Something like this:

group/template_1

{exp:reeposition}
{exp:weblog:entries weblog="foods"}
{reeposition:item id="cats"}{categories backspace="1"}{category_id}&{/categories}{/reeposition:item}
{reeposition:item id="eid"}{entry_id}{/reeposition:item}
{/exp:weblog:entries}

{embed="group/template_2" cats="{reeposition:put_item id="cats"}" eid="{reeposition:put_item id="eid"}"}
{/exp:reeposition}

group/template_2

<DIV class="related">
<UL>
{exp:weblog:entries weblog="foods" category="{embed:cats}" entry_id="not {embed:eid}"}
<LI><a href="http://{comment_url_title_auto_path}" title="{title}">{title}</a></LI>
{/exp:weblog:entries}
</UL>
</DIV>

How does that look?

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

Incidentally, you may want to post a feature request to have the related_categories_mode be able to handle both OR and AND situations. Maybe something like

{exp:weblog:entries weblog="blog" related_categories_mode="or"}

versus

{exp:weblog:entries weblog="blog" related_categories_mode="and"}
       
Martin Berglund's avatar
Martin Berglund
9 posts
17 years ago
Martin Berglund's avatar Martin Berglund

Mr. Wilson

Thank you very much for making this plugin. It solved all my pagination problems ;o)

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

Glad it helped you, Martin!

And Victor G, did everything work out ok for you?

       
Jean-Pol's avatar
Jean-Pol
9 posts
17 years ago
Jean-Pol's avatar Jean-Pol

Hello, I use the Solspace tag module. When entry_id is not part of the url, the code below dont work. Entry_id is in the weblog entries loop, and I need it outside the loop.

{exp:reeposition}
{exp:weblog:entries weblog="web" orderby="edit_date" sort="desc" limit="1" category="4"}
{reeposition:item}{entry_id}{/reeposition:item}
<h1>title</h1>
{text}
<div class="tagsarticle">
{exp:tag:tags entry_id="{entry_id}" backspace="1" type="weblog" orderby="clicks" sort="desc" limit="10"}
<a href="http://{path=site/tags/tag}{websafe_tag}" title="{tag_name}">{tag}</a> |
{/exp:tag:tags}
</div>
{/exp:weblog:entries}

<div class="tagsrelated">
<h3>Tag related...</h3>

<ul>
{exp:tag:related_entries  limit="10" entry_id="{reeposition:put_item}" }
<li><a href="http://{url_title_path=site/articles/}">{title}</a></li>
{/exp:tag:related_entries}
</ul>
</div>
{/exp:reeposition}

The code don’t work : if I use reeposition put_item outside the tag related_entries, it works fine.But in the tag, it seems put_item is not parsed at the good time … How proceed ?

       
Daniel Walton's avatar
Daniel Walton
553 posts
17 years ago
Daniel Walton's avatar Daniel Walton

Hey Mr. Wilson, a small feature request here 😊

I’d like to see this plugin be able to store the items in the $SESS->cache array so that multiple calls to the plugin can be made on a template, all having/or adding to the pool of available items.

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

Sorry, the_butcher, I just saw your feature request. I’ll take a look at adding that.

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

Hi Mr. Wilson,

I just love this plugin! I’ve used it very successfully on a few projects but there is one little thing that bugs me.

When wrapping the weblog tag with this plugin, the weblog tag’s 404 redirect stops working. An example:

{exp:reeposition}

{embed="includes/_html_header_inc" title="{reeposition:put_item id="title"}"}

{exp:weblog:entries weblog="news" url_title="{segment_3}" require_entry="yes" limit="1"}
{if no_results}{redirect="404"}{/if}

</h2>{title}</h2>
{reeposition:item id="title"}{title}{/reeposition:item}

{/exp:weblog:entries}

{/exp:reeposition}

When I place the reeposition tags inside the weblog tag, the 404 redirect works fine. Unfortunately that won’t work for my current project.

I tried catching the 404 page in the plugin somehow but without success. Any ideas on how to work around this problem?

Cheers!

EDIT: changed the example.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham
Hey Mr. Wilson, a small feature request here 😊 I’d like to see this plugin be able to store the items in the $SESS->cache array so that multiple calls to the plugin can be made on a template, all having/or adding to the pool of available items.

Maybe you could add an ID to the tag so you could have multiple reeposition tags

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

Mr. Wilson,

I’m having a bit of a weird issue that’s being causes by Reeposition. It’s outlined in this thread:// http://ellislab.com/forums/viewthread/70618/

Any ideas?

EDIT: Sorry, I just noticed that Cocoaholic is having the exact same issue that I’m having with the 404 redirect if no results.

I’ll try it by putting the reeposition code inside of the weblog entry tag and see if that changes the behavior or if it will even work for what I need.

Thanks

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

Hi deronsizemore,

Please give Reeposition 1.3 a shot. I actually worked on this back in December, but for some reason I didn’t update the file on the server. Since it’s been a while, I don’t remember the reasons behind the 404 problem, and I don’t have time to refresh my memory right now. But give this a shot:

Instead of

{if no_results}{redirect="404"}{/if}

use

{if no_results}{reeposition:redirect="404"}{/if}

Please let me know how that works out for you.

       
First 3 4 5 6 7

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.