Hi,
I just made up my mind and I would like to have a drop down menu for my categories in my blog. So from my Site Navigation (see screenshot) I would like to have a similar styled drop down menu which is automatically feed by my categories.
Is there already some code out there someone would share?
Daniel
Dropdown Categories
Dropdown Categories
- Attachments
-
- Screen Shot 2011-08-12 at 18.03.13.png (96.74 KiB) Viewed 7625 times
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Dropdown Categories
Hi!
You might want to heckout the serendipity_plugin_dhtml_categories (or something like that) plugin. It uses an outdated PEAR DHTML_Category module that is no longer properly maintained, but the basic idea on how to fetch the categories should still apply and make it possible to output a HTML tree that JavaScript can use to transform into a dropdown...?
Regards,
Garvin
You might want to heckout the serendipity_plugin_dhtml_categories (or something like that) plugin. It uses an outdated PEAR DHTML_Category module that is no longer properly maintained, but the basic idea on how to fetch the categories should still apply and make it possible to output a HTML tree that JavaScript can use to transform into a dropdown...?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Dropdown Categories
Hi,
I am trying to integrate my drop down menu into my template and many questions arise. The first is:
* How can I access the stored configuration of the theme from within the config.inc.php of my theme?
Daniel
I am trying to integrate my drop down menu into my template and many questions arise. The first is:
* How can I access the stored configuration of the theme from within the config.inc.php of my theme?
Daniel
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Dropdown Categories
Look at the bulletproof template for code to retrieve template options.
=Don=
Re: Dropdown Categories
@Don, Thanks, I will do that.
@All, I have now a semi-working implementation of the drop down mechanism. I just don't get why the submenus are not displayed next to the cursor / parent category but they always start at the top...
Could someone give me a hint what css would fix that?
Daniel
ps. the link is http://test.scrmblog.com
@All, I have now a semi-working implementation of the drop down mechanism. I just don't get why the submenus are not displayed next to the cursor / parent category but they always start at the top...
Could someone give me a hint what css would fix that?
Daniel
ps. the link is http://test.scrmblog.com
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Dropdown Categories
Search for "son of suckerfish" or "suckerfish css"... numerous examples available.
=Don=
Re: Dropdown Categories
Yeah, that's where I have most of my inspiration from, the only thing I don't get is how to place each submenu next to the (prior) menu entry and not always on top.
Daniel
Daniel
Re: Dropdown Categories
Ok, I now got the drop down menu working for the major part now in standard compatible browsers. (test.scrmblog.com -> Categories) So I have two issues left:
* Ipad: Since there is no hover I have problems to navigate through the whole categories menu. Is it somehow possible to use the first click on an item as a hover event and the second click as real click?
* IE 8 and below: The screenshots show that the drop down is not rendered well in IE 8. I can think of two options: a) I made a css mistake and / or it could be fixed somehow in the style.css b) Is it possible to have two alternative sites for IE and for browsers? So that if someone with IE surfs by I get the old sidebar categories menu and if a browser surfs by the CSS Dropdown is presented? But how / where could I differentiate between the browsers?
Daniel
* Ipad: Since there is no hover I have problems to navigate through the whole categories menu. Is it somehow possible to use the first click on an item as a hover event and the second click as real click?
* IE 8 and below: The screenshots show that the drop down is not rendered well in IE 8. I can think of two options: a) I made a css mistake and / or it could be fixed somehow in the style.css b) Is it possible to have two alternative sites for IE and for browsers? So that if someone with IE surfs by I get the old sidebar categories menu and if a browser surfs by the CSS Dropdown is presented? But how / where could I differentiate between the browsers?
Daniel
- Attachments
-
- ie8 drop down
- Screen Shot 2011-08-23 at 15.40.49.png (211.6 KiB) Viewed 7545 times
-
- Safari Drop Down
- Screen Shot 2011-08-23 at 15.41.04.png (192.31 KiB) Viewed 7545 times
Re: Dropdown Categories
Even if so, it would probably interfere with other touch screen gestures like double tap to zoom in. There are ideas to replace menus with select elements (using JS) on touch screen devices, but I'm not sure this would be easy to pull of for a nested ul used for a dropdown menu. Also potentially without any fallback for device without JS support. Then again, I'm not a JS guru.danst0 wrote:* Ipad: Since there is no hover I have problems to navigate through the whole categories menu. Is it somehow possible to use the first click on an item as a hover event and the second click as real click?
http://css-tricks.com/13303-convert-menu-to-dropdown/
Depends. Could you post just the CSS used for the dropdown menu?danst0 wrote:a) I made a css mistake and / or it could be fixed somehow in the style.css
It is possible using rather horrible hacks like using conditional comments to emit different HTML, but I don't think it's worth the effort for a single browser.danst0 wrote:b) Is it possible to have two alternative sites for IE and for browsers? So that if someone with IE surfs by I get the old sidebar categories menu and if a browser surfs by the CSS Dropdown is presented? But how / where could I differentiate between the browsers?
YL