![]() |
|
Getting Album titles for same level albums - 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: Getting Album titles for same level albums (/thread-4986.html) |
Getting Album titles for same level albums - Denn - 2009-04-06 Hi, My first post here and I've been searching for a while with no luck on this topic. What I want to do is get the titles of all the albums at the same level as a parent album from one gallery when I go into the gallery album's subalbums. For example: Gallery: Fine Art When I go into any of those albums' subalbums (e.g. Abstract | Light Floats) I want to be able to show links to Abstract, Architecture, Places. Getalbumtitle() only gets the other subalbum titles so doing something like this: ` [*]" title="View album: "> ` Any ideas or solutions? Getting Album titles for same level albums - sbillard - 2009-04-07 NB: put code in backticks, that prevents things like
Getting Album titles for same level albums - acrylian - 2009-04-07 You also could use the direct way via mysql with a Getting Album titles for same level albums - Denn - 2009-04-07 Thanks folks. I'm still learning so it will take me a while to digest this but I'll get back to you with results or further questions. Getting Album titles for same level albums - Denn - 2009-04-07 Hmm.. I DO have a lot to learn. Tried (starting at line 47): Got - Fatal error: Call to a member function getSubalbums() on a non-object in (full path to) dennsantorophoto/fineart/themes/highslide/album.php on line 48 As I said I'm a newbie here although I've been coding in other languages (mostly OPAL and HTML/XHTML) for a couple of decades. PHP is still new to me. I'm not familiar with the exact meaning of -> for example (although I get that it basically means do the function on the right to the variable on the left). I'm not sure where the variable $_zp_current_album is getting assigned or if it is a property of something already assigned (it doesn't seem to be listed under gallery or album . The documentation (which unfortunately doesn't seem searchable) does not seem to show it. So I'm guessing that it isn't assigned and so the call it is trying to generate to getparent() isn't returning an assignment to $Parent. But is so, then why don't I get the error on line 47 instead of 48? I've also tried echoing the vars but get nothing in the resulting page generated. Getting Album titles for same level albums - sbillard - 2009-04-07 You would have to be in a subalbum for this to work. If you are at the first level naturally there are is no parent. Guess you need to add to the code ` Getting Album titles for same level albums - Denn - 2009-04-07 More... Playing with the plugin as suggested. Mostly works as I want but I can't turn on the active CSS it seems `` mmhere is the css class. Looking at the generated code it just doesn't show up.
But it is close. I'm getting most of what I need with this. I may be continuing to play with it but you can see where I have gotten at: http://dennsantorophoto.com/fineart/ if you are interested. Getting Album titles for same level albums - acrylian - 2009-04-08 You did not set the active class, you set the main css class, the active one is the 6th parameter. Getting Album titles for same level albums - Denn - 2009-04-08 Acrylian, Thanks for you help so far. Thanks to Sbillard too. I'll be looking at that code later today but I have to deliver a bunch of work to a new show this morning. Anyway... Moving "mmhere" to the 6th position didn't seem to effect anything. `` Still gets me: This menu displays on top level albums or subalbums (what I want it to do). It does it appropriatley with the subalbum level displaying all active links: ` The menu layer above that is generated in my html inserted into Album.php. The nav menus are desiged to be two layers always visible. The top is the overallsite. When you go into one of the galleries (Fine Art in this case but there are others like Performer candids) I want the user to see all the top level albums whether they are in a top level album or a subalbum. Makes the nav clean and easy to understand. But I am trying to use the mmhere class to turn on the background highlight as you see in the top level menu under fine art (still needs a bit of css tweaking to line up properly in all browsers but that is a detail for later). Thanks again for the help. Getting closer all the time. Getting Album titles for same level albums - Denn - 2009-04-08 A little more testing showed that if I put it in the 4th I get the background when at the top level albums. It is up now if you want to see. `` So that is great. I guess I have to understand better how you are defining things. But I'm getting there. Thanks again. Next to figure out when I'm in a subalbum, give it a title and still mmhere the now active link for the right parent menu in the list. Another task for later today. Thanks again folks. Getting Album titles for same level albums - Denn - 2009-04-09 A little more progress and a little more confusion. Using Sbillard's code I get "Warning: Invalid argument supplied for foreach()" but I don't see the problem with the argument. It looks to be formed correctly. Perhaps a class or typing mismatch? Getting Album titles for same level albums - acrylian - 2009-04-10 Probably the album does not have subalbums so there is nothing passed to the foreach loop. Getting Album titles for same level albums - Denn - 2009-04-11 Well, I don't think it was that as i was using a condition so the code was only being cold when it was at the right level. Anyway, I finally got it with a little creative use of the menu list plugin and some of what I learned from perusing it. Many thinks for the fine work in there acrylian! It has taught me a lot about php and greatly appreciate that and the kind help. The css still needs tweaking but you cna see the basics here if you are interested http://dennsantorophoto.com/fineart Denn |