Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-18 04:35:53

bradleyc
New Member
Registered: 2007-01-18
Posts: 3

upm_article_image limit offset issue

I am attempting to use multiple instances of upm_article_image to display several images with an article. When I use limit=“1” and offset=“1” the first image display in each instance.

Here is the portion of my article form that determines which which to display:

<code>
<txp:if_custom_field name=“FirstImagePosition” val=“left”><div id=“articleHead”><txp:upm_article_image limit=“1” offset=“1” form=“image-article-top” /></div></txp:if_custom_field>
<txp:if_custom_field name=“FirstImagePosition” val=“top”><div id=“articleHead”><txp:upm_article_image limit=“1” form=“image-article-top” /></div></txp:if_custom_field>
</code>

I am using Textpattern v.4.0.4 and upm_image v.0.5.3

Offline

#2 2007-01-20 10:36:11

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: upm_article_image limit offset issue

I cannot replicate this.

First, I would get rid of the customization and see what the results are:

<txp:upm_article_image limit="1" /> <!-- should display first image -->

<txp:upm_article_image limit="1" offset="1" /> <!-- should display second image -->

Offline

#3 2007-01-20 22:41:44

bradleyc
New Member
Registered: 2007-01-18
Posts: 3

Re: upm_article_image limit offset issue

Thanks for your reply Mary.

I did as you suggested and removed the customization.

When I have only one image id entered in the Article image field the image appears in both positions on my page.

When I have two images it produces a tag errors.

First error:
<code>tag_error <txp:upm_article_image form=“image-left” limit=“1” /> -> Notice: Undefined variable: rs on line 135</code>

Second error:
<code>tag_error <txp:upm_article_image offset=“1” limit=“1” form=“image-article-top” /> -> Notice: Undefined variable: rs on line 135</code>

The form ‘image-left’:
<code><img src=”<txp:upm_img_full_url />” width=”<txp:upm_img_full_width />” height=”<txp:upm_img_full_height />” title=”<txp:upm_img_alt />” alt=”<txp:upm_img_alt />” class=“imageLeft” /></code>

The form ‘image-article-top’:
<code><img src=”<txp:upm_img_full_url />” width=”<txp:upm_img_full_width />” height=”<txp:upm_img_full_height />” title=”<txp:upm_img_alt />” alt=”<txp:upm_img_alt />” /><br /><p class=“caption”><txp:upm_img_caption /></p><p class=“credit”><txp:upm_img_alt /></p></code>

Offline

#4 2007-01-21 02:36:30

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: upm_article_image limit offset issue

Okay, try the new version I uploaded a few hours ago.

Offline

#5 2007-01-21 16:52:58

bradleyc
New Member
Registered: 2007-01-18
Posts: 3

Re: upm_article_image limit offset issue

Thanks Mary.

I installed your new version and now I am now receiving a tag error for each tag in my forms below.

Here is an example. The Textpattern notice is the same in each error.
<code> tag_error <txp:upm_img_alt/> -> Textpattern Notice: upm_image: invalid context, tag must be used within the tag as a wrapper or from its own form called by the tag. on line 521 </code>

The form ‘image-left’:
<code><img src=”<txp:upm_img_full_url />” width=”<txp:upm_img_full_width />” height=”<txp:upm_img_full_height />” title=”<txp:upm_img_alt />” alt=”<txp:upm_img_alt />” class=“imageLeft” /></code>

The form ‘image-article-top’:
<code><img src=”<txp:upm_img_full_url />” width=”<txp:upm_img_full_width />” height=”<txp:upm_img_full_height />” title=”<txp:upm_img_alt />” alt=”<txp:upm_img_alt />” /><br /><p class=“caption”><txp:upm_img_caption /></p><p class=“credit”><txp:upm_img_alt /></p></code>

Offline

#6 2007-01-22 20:59:32

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: upm_article_image limit offset issue

Offline

Board footer

Powered by FluxBB