Member
Member
Barbara   23-06-2010, 23:14
#1

How can you set zp to print the album description only if it's present?
This is as far as I can go:

It's because I want to get rid of the empty spans in the markup when an album doesn't have a description.
``

Administrator
Administrator
acrylian   24-06-2010, 06:51
#2

Those empty spans are needed for the inline editing on the website (you can click there and add text directly.
Use printAlbumDesc(false,'',false)

Always a good idea to look at the docs:
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionprintAlbumDesc

Of course something like if(getAlbumDesc() != "") { echo getAlbumDesc(); } would work, too.

Member
Member
micheall   24-06-2010, 10:40
#3

@barbara
I used the example acrylian did on my last theme. I only used it deciding if I needed to add captioning to a lightbox though. As acrylian said, if you don't have it on your image page you won't be able to edit it from there while logged in as admin. Remember that your gallery views are different when you're logged in than when a normal users views your site.

Member
Member
Barbara   25-06-2010, 12:46
#4

Thanks acrylian! I put
and did the same for the date. Everything is perfect now.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.