Please see test site where it says “Caption and Title go here” thats what I would like, the main image caption and title in that position. I have tried the reeposition plugin numerous ways and all I get is the plugin code under the main image.
Thank You Frank
What have you tried? It’s difficult to say where the problem lies without seeing some samples of what hasn’t worked for you. You might also try setting up a very simple demo demonstrating what you want to do with most of the extraneous stuff stripped out. For example, something like:
<pre><code><body> {exp:reeposition}
{exp:gallery:categories gallery="{gallery_name}”}
stuff stuff stuff
<div id=”leftbottominsert”>{reeposition:put_item}</div> {/exp:gallery:categories}
{exp:gallery:entries gallery="{gallery_name}” dynamic=”on” entry_id=”8”} {reeposition:item}Title: {title}, Caption: {caption}{/reeposition:item} {/exp:gallery:entries}
{/exp:reeposition} </body>
Thank you for your reply Mr Wilson, I have taken a bit of time to try a few things out. The best I can come up with is to get the Title: {title}, Caption: to show in the correct position but without the title changing for each image. What I have done is leave the original title in place under the main image to show what the title should be. Please forget the caption for the moment (they do not yet exist). This original title changes as the images change but the reepositioned one does not. Example site test site . Small explanation the {if segment_3 ==""} section operates only on first load the {if:else} section after first load. Perhaps I am expecting it to do something it was not designed for ie move dynamic tags?
Thank you Frank
<body>
{exp:reeposition}
lots of stuff
<div id="leftbottominsert">{reeposition:put_item}</div>
{/exp:gallery:categories}
more stuff
<div id="rightcolumn">
{if segment_3 ==""}
{exp:gallery:entries gallery="{gallery_name}" dynamic="on" entry_id="8"}
<a href="http://{image_url}" rel="lightbox"><span></span> <span>{medium_url}</span></a>
{title}
{reeposition:item}Title: {title}, Caption: {caption}{/reeposition:item}
{/exp:gallery:entries}
{if:else}
{exp:gallery:entries gallery="{gallery_name}" dynamic="on"}
<a href="http://{image_url}" rel="lightbox"><span></span> <span>{medium_url}</span></a>
{title}
{reeposition:item}Title: {title}, Caption: {caption}{/reeposition:item}
{/exp:gallery:entries}
{/if}
{/exp:reeposition}
</body>
For some reason*, EE parses advanced conditionals (conditionals that include if:else or if:elseif blocks) differently than simple {if}{/if} blocks. The latter’s contents are parsed if and only if the condition is true; the former’s contents are parsed no matter what, and the decision to display or not display those contents is made very, very late in the template parsing process.
So how did that affect your situation? Basically Reeposition saw TWO {reeposition:item} tags, whereas you assumed it was only seeing one. (One if segment_3==”“, the other if not.) Since Reeposition doesn’t know what to do with multiple {reeposition:item} tags, it just chose one of them to deal with – the first one it came across.
There are two ways to deal with the problem. One is to do what I had you do and use simple conditionals. It makes your template code a little uglier, but it’s more efficient (EE only parses the content of one of the blocks instead of both of them), and it helps out Reeposition in this case. The other option is to use assign each of the reeposition:item tags a unique ID (i.e. {reeposition:item id="hello"} and {reeposition:item id="world"}) … but I don’t think that’s ideal in your situation.
I’m not sure how good of an explanation that was. Let me know if I can clarify.
Mr. Wilson,
I am still running the 1.2beta beta version you put together when you were trying to help me sort out that one really complex index I had. We never managed to get that to work (for some odd reason, the plugin appeared to end up using far more memory than just repeating the weblog entries tag for each part of the display), so I was wondering if you’d suggest I stick with this beta if I plan to use the plugin for something else, or if I should downgrade to the latest proper release?
Btw, I don’t suppose you have any more idea now why the implementation I tried out never quite worked? 😊
The fact that it does manage to output some of the entries (and with the right formatting and all) makes me think memory issues, but on the other hand, doesn’t a lack of memory in php usually result in a blank page, not a partially rendered page? And it does seem strange if the plugin would take more memory than the 20+ wbelog entries tags I have to use otherwise (and that setup does work).
I never did come up with a good explanation for the problems we had with your setup. I don’t remember all the details, but I seem to recall that everything worked just fine … until a certain point. Then it went phlbbbbbp. I never could figure out why that straw kept breaking the camel’s back.
Were you using advanced conditionals ({if:else} and/or {if:elseif} ), by chance?
Hmm, you know, that might be it. This was the version we ended up with, that seemed like it should work, but that only spit out some of the content:
{exp:reeposition}
{exp:weblog:entries weblog="{current_weblog}" disable="member_data|pagination|trackbacks"}
{if entry_id == "445" || entry_id == "446" || entry_id == "483" || entry_id == "484" || entry_id == "485" || entry_id == "486" || entry_id == "487" || entry_id == "488" || entry_id == "489"}
{reeposition:item id="{entry_id}"}
{if {current_weblog_id}_motto != ""}
<li>{if {current_weblog_id}_book_status == "Dead"}{{/if}<a href="http://www.westeros.org/Citadel/Heraldry/Entry/{entry_id}/" target="Heraldry" onclick="openWindow(this.href,this.target,0,0,1,0,0,750,520,0,0); return false">{title}{if {current_weblog_id}_seat} of {{current_weblog_id}_seat}{/if}</a>{if {current_weblog_id}_book_status == "Dead"}}{/if} - {{current_weblog_id}_motto}</li>
{/if}
{/reeposition:item}
{if:else}
{reeposition:item group="category_{categories}{category_id}{/categories}"}
{if {current_weblog_id}_motto != ""}
<li>{if {current_weblog_id}_book_status == "Dead"}{{/if}<a href="http://www.westeros.org/Citadel/Heraldry/Entry/{entry_id}/" target="Heraldry" onclick="openWindow(this.href,this.target,0,0,1,0,0,750,520,0,0); return false">{title}{if {current_weblog_id}_seat} of {{current_weblog_id}_seat}{/if}</a>{if {current_weblog_id}_book_status == "Dead"}}{/if} - {{current_weblog_id}_motto}</li>
{/if}
{/reeposition:item}
{/if}
{/exp:weblog:entries}
Hmm, can I get away with a regular old conditional in that scenario?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.