ZenphotoCMS Forum
zpMasonry: Number of album tags on home page - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: zpMasonry: Number of album tags on home page (/thread-10922.html)



zpMasonry: Number of album tags on home page - mironb - 17-03-2013

Hi
I am using zp masonry theme and on main page I have all tags under the album picture and description. I would like to limit the number of tags to 10 or 8. Is that possible ? The string which displays the tags looks:
``




zpMasonry: Number of album tags on home page - acrylian - 17-03-2013

Please always add the name of a 3rd party tool so its author maybe able to help.

In this case printTags() is a standard function that simply prints all tags assigned. If you want only 8 you have to create your own output for that use getTags():
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetTags

General rule: Most all template functions have a print and get variant. And if not there is always the object model to do most anything directly.




zpMasonry: Number of album tags on home page - mironb - 18-03-2013

Hi thanks for fast respond. I am sorry but I am a photographer and php is unknown for me

I replaced
with
and that's does not work




zpMasonry: Number of album tags on home page - sbillard - 18-03-2013

There is no discontinuity between being a photographer and programming in PHP I am both. Unfortunately, if you want to customize things then acquiring some knowledge is essential.

In your case above, you need to understand that the "get" versions of functions never produce output, just return something that you then have to act on. The "print" versions are the ones that put something on the page.

So getTags returned you a list of tags. If you want them shown you have to format them for your page.




zpMasonry: Number of album tags on home page - acrylian - 18-03-2013

And I studied illustration originally, just to mention..;-)

A bit more specifially: getTags() returns an array that you need to output via something like a foreach loop.