Hi gang.
Is it possible to print only the Sub pages and skip the main page.
What I am trying to do I am making a horizontal menu that has a page number 1 using PrintPageMenu with 0 sub allowed then it has printAlbumMenu after that it prints out PrintPageMenu and hopefully only the subs of page nr 1. But of course as it is not it prints the 1 menu item with the subs.
I will do a screenshot to hopefully illustrate a little better.
http://img.skitch.com/20091109-btjugr3qjhkr4i8d6j372123h7.jpg
http://img.skitch.com/20091109-qgsxbxgck18nawxeg56hfk625s.jpg
The page menu generally generates a nested html list. With the right CSS setup you probably get what you want, too.
I came up with a solution that should work. at least for now. Not a very pretty code...
`
`
Menu can be seen here.
http://www.moment.is/
I do have a couple of questions.
First regarding the menu...
Would it be possible somehow to be able to click on a menu item again when it has been selected. For example the Gallery(gallerà in this case) when a user might want to click on it to go back to the gallery overview when in Single Image mode. As it is not Active menu items can not be clicked.
Second is a bit different.
Would it be possible in single image view to pass the image Title to a certain field in the contact form. By placing a link that maybe uses printImageTitle on Single Image page and sends it to the contact form. I hope I am clear on that one. A little screen-shot of 2 different browser windows to illustrate my point.
http://img.skitch.com/20091110-jin292iy22htrfc29d3ptc8ke7.jpg
While I am at it I might as well ask, would it be possible to add support to more then 1 subfolder CSS with printPageMenu and printAlbumMenu I am doing some experiments with drop down CSS menus for my own project, but when you have sub/sub page or folder in gallery they get the same CSS style. Maybe have 3 or 4 folder/page deep.
Main(CSS)
-Sub(CSS)
-SubSub(CSS)
-SubSubSub(CSS)
$css_class:
$css_class_active:
$css_class1:
$css_class_active1:
$css_class2:
$css_class_active2:
As well if the Main item could stay "Current" if any of the Sub Objects for that particular item are "Current"
I guess could make all elements always links optionally.
I would really like to avoid more parameters as there are already quite al lot. We could do this by automatic numbering the sublevels css . The problem is that would need to be set within the theme's css for all possible sublevels which are unlimited (I think we forgot to update the doc).
Probably passing an array would be the best option.
The main element to stay current is on the list.
I will put all on the list, maybe I manage to get to it for 1.2.7 but I can't promise.
Ok great, thanks Malte. I will keep on the lookout, Will you maybe post some updates here if they will happen soon? It would be so great to be able to have CSS drop down menu with more then 1 sub level. I have already done some testing with 1 sub level and it will save a lot of space on the page, The Sidebar could basicly go out of the way for a top menu with drop down instead.
With the contact form I have looked into some javascript and other options, I will put that on hold for now.
I gave a little more try to this today.. This is how the test looks as of now.
http://img.skitch.com/20091111-qxiw4anhxe52a6etb1q1wycam1.jpg
(White arrow is mouse pointer)
I have this local, I will upload this a little later to have a look.
So pretty much what the problem would be, is the the Master does not get current when a sub of a master is selected... as stated above and you have on your list.
and when mouse over a sub item it displays all sub levels if it self not just the first one, I cant really wrap my head around that one if that is indeed possible with current printPage and PrintAlbum using CSS only.
Currently I am doing it like this.
`
`
and the css
`
.menut {
font-family: arial, sans-serif;
height: 25px;
position:relative;
font-size:12px;
z-index:100;
background-color: #333333;
}
.menut ul li a, .menut ul li a:visited {
display:block;
text-decoration:none;
color:#CCC;
width:104px;
height:25px;
text-align:center;
color:#fff;
border:1px solid #fff;
background:#333333;
line-height:20px;
font-size:12px;
}
.menut ul {
padding:0;
margin:0;
list-style: none;
}
.menut ul li {
float:left;
position:relative;
}
.menut ul li ul {
display: none;
}
.menut ul li:hover a {color:#fff; background:#2580a2;
}
.menut ul li:hover ul {display:block; position:absolute; top:26px; left:0; width:105px;
}
.menut ul li:hover ul li a.hide {background:#2580a2; color:#fff;
}
.menut ul li:hover ul li:hover a.hide {background:#2580a2; color:#000;
}
.menut ul li:hover ul li ul {display: none;
}
.menut ul li:hover ul li a {display:block; background:#333333; color:#FFF;
}
.menut ul li:hover ul li a:hover {background:#2580a2; color:#FFF;
}
.menut ul li:hover ul li:hover ul {display:block; position:absolute; left:105px; top:0;
}
.menut ul li:hover ul li:hover ul.left {
left:-105px;
}
ul#menut li.current {
display:block;
text-decoration:none;
color:#CCC;
width:104px;
height:25px;
text-align:center;
color:#fff;
border:1px solid #fff;
background:#0020a2;
line-height:20px;
font-size:12px;
}
ul#menut li ul.submenu li.SubActive {
display:block;
text-decoration:none;
color:#CCC;
width:104px;
height:25px;
text-align:center;
color:#fff;
border:1px solid #fff;
background:#0020a2;
line-height:20px;
font-size:12px;
}
`
I wonder if it would be possible to use the way the menu is built up and just call the subsubsub menu for example.
See for example screenshot from CssEdit
http://img.skitch.com/20091111-ns93miew9icwch9mjsm666g1ig.jpg
There it shows how the style is for the SubSubSub menu and I wonder if it could be controlled somehting like
ul#menut li ul.submenu li ul.submenu li ul.submenu
For Example using
ul#menut li ul.submenu li ul.submenu li ul.submenu li.SubActive { background:#FF0; }
Changes the background color of the SubSubSub
Looks good and these kind of menus are of course quite complicated css. I have never tried this with the menu although I had thought about the general use for this (no one tried before you...;-)).
Quote:when mouse over a sub item it displays all sub levels if it self not just the first one
I am not sure if I understand, if a sub item has two subsub items then both should be shown inf sub item is selected, right?
The menu uses nested lists so generally it should be possible to address each if the have class or id. But of course the problem is to make this scalable to not have to setup dozens of classes/ids in case the sub levels grow (unless you know the depth).
Here is an example... It is just your standard ZenPage Theme added header.
http://www.olihar.com/ZenTest/
I am going to look a little bit more into the css later tonight locally, if I get anything interesting I might upload it.
Just to mention it, I just saw by mistake, if I get a 404 Error page, printAlbumMenu returns an error. You can check it out yourself on that test install.
This is the error.
Fatal error: Call to undefined function printalbummenu() in (PATH to folder)/ZenTest/themes/zenpage-default/topbar.php on line 2
Again, the topbar is just a php file like sidebar with the current code of.
`
`
It seems that my CSS is working pretty much now..
http://www.olihar.com/ZenTest/
just try the Photographs and Portrait folder and all its sub folders in the menu. Well not like I will me using so many subs my self. So screen-shot how its made, really. I guess its possible to keep on forever. As far as I can see this is the easiest way to add drop down menu to ZenPhoto as it is now.
http://img.skitch.com/20091112-t368y4kgge1pdq1tsbjdsx6bra.jpg
Now there are basicly only 2 things to get this working as I had in mind, Master item to stay current when any sub level current below. Well on the point it could be nice that any item stays current if it has an item in a sub below itself that is current.
As well the current menu items ether master or sub to be click-able when current.
What do you recon Malte? about usage like this instead of sidebar and to try and work on these 2 factor I mention above to add to the system.
Tonight's nightly has both printAlbumMenu() and printPageMenu() always with links. About marking all parent elements as active I need to think a little more. It surely can be done but I probably won't get to it before feature freeze (btw, sbillard had largely optimized the menus after I started them so I am a little unfamiliar right now).
A detail I forgot: The current css class is now attached to the instead of the to get the default behaviour in marking the currently selected element in standard themes. You probably need to change that detail.
Great Malte, I will look into this. And post an updated code and CSS here. For others to use if they want. I will most likely impliment it to my own webpage in the next weeks.
On the matter of passing the image name to a certain field in the contact form. Do you have any idea how that could be possible. Even if I had to hardcode something into the contact form for this one project.