Code Block only on third level albums?

slart

Joined: 2013-11-11
Posts: 112
Posted: Wed, 2014-04-02 16:03

Hello,
how can I set it up that I have a "code block" from the modules: code_block only on a lower level of an album.
example:
Home (1. Level) - Spring Album (2. Level) - April Album (3. Level) - Photo Page
...
...

The "code block" should appear only on the albums in the third level in the Info Box.

 
spags

Joined: 2010-03-26
Posts: 120
Posted: Wed, 2014-04-02 20:06

If it isn't already in the database somewhere, then I'm afraid you are going to have to count your way up/down the albums. I needed to do something similar some time ago (determine the level) and I've noted that I had to refer to the gallery helper item::find_by_path function. You might want to start by doing likewise.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2014-04-02 21:35

Sounds more like a case for the custom fields module. Or just adding some text the the album discription? Adding such narrow functionality is not something I would like to add as it is only for one user and then makes it hard to maintain in the future.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
slart

Joined: 2013-11-11
Posts: 112
Posted: Thu, 2014-04-03 05:52

Hi dave,
that is correct. it is very special. But again not specifically.
I have already noticed that there is no distinction between main album "Home" and sub-albums, which is a bit of a disadvantage. It makes the design too general.
Using the description would be a possibility, since it is separated for each album. But first, I have my Gallery so adjusted that the description is in the main (Description over the thumbs and under the photos), and secondly, the content would I want to put in this code box does not match the description, it must be separate. and thirdly, I 've taken the opportunity to use the description for something similar.
And last of all: it should not be an extra for each album, but only for the levels of sub-albums.

I can sometimes explain why, that is the idea behind it.
In the main albums are few thumbs, so the page is not very high. In the sub-albums are many thumbs, so the site is very high. This height can I use in the info box for more information.

But to make it not too hard to make and keep general might be a second description box a general solution.

This is just an idea. Maybe they have several.