How to add custom text to a Parent Album?

I'm not referring to just adding a description to the album itself. My client wants a 6th "box" added to this page - http://slyspyder.com/zenphoto/fineart/

That would just have text in it explaining some pricing options. How would I add a "box" to just display when the Fine Arts is displayed and not the other albums?

For example if the album displayed is FineArt display this text, if it's Stock Images display this text, etc.

Comments

  • acrylian Administrator, Developer
    http://www.zenphoto.org/documentation/functions/_functions.php.html#functiongetUrAlbum
    You then would have to use the object model to get the desired display. There is a tutorial (of course you need php knowledge).
  • And where is the tutorial? Or can you give me a little hint?

    Thank You.
  • acrylian Administrator, Developer
    There is a user guide section on our site....
  • Oh, duh. Sorry, lol. I'll see what I can do. If I figure it out I'll post how I did it so others can find it helpful..

    Edit - Am I even close?

    `
    <?php
    $galleryobject = new Gallery();
    $fineart = new Album($galleryobject,"<fineart>");

    if ($galleryobject = "") {

    echo 'Fine Art Text';

    }
    ?>
    `
  • acrylian Administrator, Developer
    Well, not really, you need to read a litte more carefully and understand some Zenphoto terms. The gallery is not an album. Please read:
    http://www.zenphoto.org/2008/08/zenphoto-glossary/
    http://www.zenphoto.org/2010/02/zenphotos-object-model-framework/
    http://www.zenphoto.org/2008/07/zenphotos-global-variables/

    To get the description of the toplevel parent of any album;
    `$uralbumobj = getUrAlbum($_zp_current_album);`
    echo $uralbumobj->getDesc();`

    Btw `$galleryobject = ""` would overwrite $galleryobj.... and makes it the value "<fineart>". But that is nonsense anyway (see the tutorial)..:-)
  • mm the search continues. I may just go another route. I'm not sure how to accomplish this.

    Thank you for trying to help me.
  • acrylian Administrator, Developer
    Well, I exactly told you how to get the top parent of an subalbum and optionally the description from it (any other field is similar and documentated) . Of course you can use hardcoded text as well.

    If that is not what you want that you are probably either did not my example or where not specific enough...;-)
  • My client is just really picky is all. I'll give him some options this week and see how it goes. Displaying the description of the parent album works great, but it also displays on the sub-albums as well which isn't needed. Plus the div "box" he wants would also show on any album page instead of just the fine art.

    I'm going to show him a css pop-up instead and see how that goes with him. I do appreciate your help very much thus far acrylian.
  • acrylian Administrator, Developer
    Ok, if that box should only be shown if in the toplevel itself then a direct check like
    `if($_zp_current_album->name == "") { }`
    is all you need. Pretty plain standard and simple stuff.
Sign In or Register to comment.