Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-11-06 10:23:02

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

images per article

hello,

is there a limit for images per article?
i have added ~100, but only 63 images is displayed :(

form i’m using:

<h1><txp:title /></h1>
<txp:body />
<txp:if_article_image><txp:images auto_detect="article" form="article_album" wraptag="ul" break="li" class="article-album" /></txp:if_article_image>

Offline

#2 2014-11-06 10:30:58

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 390

Re: images per article

there is a limit of characters for the images field. You should alter that field with phpmyadmin or similar to allow more characters (backup your database first!!)


<txp:rocks/>

Offline

#3 2014-11-06 10:40:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: images per article

Gallex wrote #285500:

is there a limit for images per article?

As milosevic says, the article image field is limited to 255 characters, like other custom fields at present. If you’re adding so many images per article, how about assigning them to a category and putting the category name in the article image field? Then alter your form to use that instead:

<txp:if_article_image>
   <txp:images category='<txp:custom_field name="article_image" />' form="article_album" wraptag="ul" break="li" class="article-album" />
</txp:if_article_image>

If you make the image category name the same as the article’s url title you could even skip using the article image field altogether and simply use category='<txp:article_url_title />'. But you would then lose the ability to easily test if the article was assigned images so you’d need to employ your own testing logic.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#4 2014-11-07 13:35:28

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

Re: images per article

can i do the same with a custom field?

<txp:if_custom_field name="album">
   <txp:images category='<txp:custom_field name="album" />' form="article_album" wraptag="ul" break="li" class="article-album" />
</txp:if_custom_field>

Offline

#5 2014-11-07 13:41:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: images per article

Gallex wrote #285539:

can i do the same with a custom field?

Absolutely.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2014-11-09 12:05:52

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

Re: images per article

thank’s.

Offline

Board footer

Powered by FluxBB