![]() |
|
How to add a button in a dynamic album ? - 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: How to add a button in a dynamic album ? (/thread-13272.html) |
How to add a button in a dynamic album ? - ctdlg - 2019-02-11 Hello, I would like to add a button in image.php that would only appear on dynamic pictures (a picture chosen from a dynamic album) This button would be a link to the standard album where the picture has been published. Example : Sorry if this feature has already been discussed, my search function gave me no result. Generally speaking, this could be a nice possibility for Zenphoto. Thanks in advance. How to add a button in a dynamic album ? - acrylian - 2019-02-11 All possible you have to use the object model. Knowledge about PHP object orientation required: On A basic example. The above might not work as expected for images within albums that are also results of the dynamic album (search). To get the real album the image is in use: Basics of the object model here: How to add a button in a dynamic album ? - ctdlg - 2019-02-12 Thanks acrylian. This code:
` The "if" function does work : no link on real album pictures pages. I had a look to your "Basics of the object model " page, but your code is OK, so, I do not understand what is wrong ! How to add a button in a dynamic album ? - fretzl - 2019-02-13
How to add a button in a dynamic album ? - ctdlg - 2019-02-13 Thank you fretzl, it does work. How to add a button in a dynamic album ? - acrylian - 2019-02-13 Or How to add a button in a dynamic album ? - ctdlg - 2019-05-21 Hello, How to add a button in a dynamic album ? - acrylian - 2019-05-21
To find out if an album is a dynamic album you have to use The plain images result pages are not within an album context but in search context. To find ouf it you are on the search pages you can use How to add a button in a dynamic album ? - vincent3569 - 2019-05-21 a suggestion: add a tag "album name" on each images. How to add a button in a dynamic album ? - ctdlg - 2019-05-23 Thank you for your help. How to add a button in a dynamic album ? - acrylian - 2019-05-23
If you like to do that this is possible much easier actually. You can get the real album object of an image using If you are using dynamic albums and also have your real albums reachable it is recommended to use the html_meta_tags plugin and enable the "canonical url". Then the image page will have an canonical entry to the real image location in the `` to avoid duplicated content issues. |