Hey all -
I’ve just “inherited” a new EE system with a new client. The former developer is using LG Replace to replace up to three images in any given post.
This code isn’t working for me, because I removed a limit=”1”:
{exp:lg_replace:haystack needles="photo1|photo2|photo3"}
{exp:weblog:entries weblog="{section}"}
<div class="article">
<h2>{title}</h2>
{body}
</div>
{exp:lg_replace:replacement needle="photo1"}
<span class="captionedimg">
{img1} image 1
{caption1} caption 1
</span>
{/exp:lg_replace:replacement}
{exp:lg_replace:replacement needle="photo1"}
<span class="captionedimg">
{img2}
{caption2}
</span>
{/exp:lg_replace:replacement}
{exp:lg_replace:replacement needle="photo3"}
<span class="captionedimg">
{img3}
{caption3}
</span>
{/exp:lg_replace:replacement}
{/exp:weblog:entries}
{/exp:lg_replace:haystack}
I have put in some dummy content next to the {img1} and {caption1} tags to test their efficacy. The words print out, but not the value in those fields. This code does work, however, if I limit the query to “1”.
Ideas?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.