Dec 04, 2008, 12:54 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: DropMenu with indication of subpages?  (Read 4752 times)
0 Members and 1 Guest are viewing this topic.
elander
Jr. Member
*
Posts: 26


« on: Jun 14, 2006, 03:35 PM »

Hi!

Is there a way to make DropMenu give a class to each page that has subpages? Sort of like the tree in the manager?

I use css to hide all list items except the ones with a parent with class="here", and I want a way to show visitors which pages have subpages...

I've searched extensively, but I'm either not using the right search words, or nothing has been written about this in the forums...
Logged

yoomai
Full Member
***
Posts: 247



WWW
« Reply #1 on: Jun 15, 2006, 04:24 AM »

Good question. I'm interested in an answer, too. Somebody?
Logged

cino
Jr. Member
*
Posts: 35


« Reply #2 on: Jun 15, 2006, 09:32 AM »

There is an indication of the opposite. You have a class "last", whenever that page do not have any children.

Does this resolve your css matters?
Logged
davidm
Marketing & Design Team
*
Posts: 6,777


The best way to predict the future is to invent it


WWW
« Reply #3 on: Jun 15, 2006, 09:41 AM »

Funny you ask this, I have the need for the very same thing, as anyone who builds a pure css dropmenu will if the're concerned with UI.

To my knowledge, DropMenu (and its variant) does not provide the necessary code to do what you (and I) need : e.g a css class for every folder with at least one children.

The  "last" class won't help with this, I am afraid, as it only styles the last element of a list...
Logged

.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net
elander
Jr. Member
*
Posts: 26


« Reply #4 on: Jun 16, 2006, 02:39 AM »

There is an indication of the opposite. You have a class "last", whenever that page do not have any children.

Does this resolve your css matters?

No and no. The "last" class is only applied to the last list item in the list. It doesn't apply to other list items, regardless of wether they have children or not. I've checked: I have a menu where the last four items in the main list don't have children, and only the last one gets the "last" class.

I need a "has_children"-class that applies to every list item with children, not only the last item on the list.
Logged

cino
Jr. Member
*
Posts: 35


« Reply #5 on: Jun 16, 2006, 03:14 AM »

I see now. I can do that (I think).

Stand by.
Logged
davidm
Marketing & Design Team
*
Posts: 6,777


The best way to predict the future is to invent it


WWW
« Reply #6 on: Jun 16, 2006, 06:24 AM »

That would be awesome Grin
Logged

.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net
elander
Jr. Member
*
Posts: 26


« Reply #7 on: Jun 16, 2006, 09:46 AM »

I see now. I can do that (I think).

Stand by.
Standing by, holding my brea... Grin
Logged

ppaulousek
Guest
« Reply #8 on: Jun 17, 2006, 07:08 AM »

I fear this is not a complete solution, just a hint:
children are always wrapped in a sub <ul> element. A childless node could therefore be detected by a li li sequence - i.e. with no ul in between. In CSS it should be possible to create a selector for this like "li>li".
Don't know if this helps, just a thought... Wink
Logged
heliotrope
Coding Team
*
Posts: 2,447


WWW
« Reply #9 on: Jun 17, 2006, 07:18 AM »

Quote

 In CSS it should be possible to create a selector for this like "li>li".


I've tried to do so but IE (as usual shoud I say) does not offer support of this (as far as i know)
« Last Edit: Jun 17, 2006, 07:24 AM by heliotrope » Logged

Perrine
Moderators
*
Posts: 1,764



WWW
« Reply #10 on: Jun 17, 2006, 07:33 AM »

You're right Heliotrope,

IE doesn't understand the children selector... it is so often used to make css hacks.
Logged

Nouveau sur MODx ? ||
Recherche
Communauté FR
Documentation FR
Réalisations sous MODx
Webolution
Entreprise AGS
J'aurais dû lui dire...
Atelier d'architecture Gambino
Déco'In : l'idée déco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.2/3 || Apache 2.2.8 || PHP 5.2.6 || MySQL 5.0.45 || Debian 4.0 (Etch)
elander
Jr. Member
*
Posts: 26


« Reply #11 on: Jun 17, 2006, 08:10 AM »

Also, the objective of the whole MODx project is to create a CMS that makes it easy to create validating and accessible web sites. Resorting to CSS hacks (or other hacks) is OK as long as you're a developer working on your own private site. Doing the same on a customers site is less OK. There's a good chance that things'll break when people their update browsers or the CMS. If you're the developer, you can bet your bottom dollar the customer will say it's your fault. And (s)he'll be right.
Logged

sottwell
Documentation Team
*
Posts: 8,170



WWW
« Reply #12 on: Jun 17, 2006, 09:21 AM »

There is a bit of Javascript that makes IE behave more-or-less like a real browser:

https://sourceforge.net/project/showfiles.php?group_id=109983&package_id=119707

I've successfully used it to implement a remake of a framed site using "fixed" elements.

Then there is the "universal IE hack":

http://www.ibloomstudios.com/article7/

Unfortunately, like it or not, we will be stuck with either hacks or IE conditionals in our templates for a long, long time.
Logged

sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html
ppaulousek
Guest
« Reply #13 on: Jun 19, 2006, 06:07 AM »

Since this cannot be solved by css and dropmenu's standard features you might have to jump in the source.
I found a control which might be appropriate for your issue:   $itsEmpty = ($isFolder && ($child['template'] == '0'));

So when $itsEmpty is false, the current folder has children or is not a folder, just a document. In the "construction-line" of the outstring for those items you may add a class-string (hack) or introduce a new parameter as a variable for it (non-hack).

Hope this helps.
« Last Edit: Jun 19, 2006, 06:14 AM by ppaulousek » Logged
ppaulousek
Guest
« Reply #14 on: Jun 19, 2006, 01:31 PM »

Ahem:
https://sourceforge.net/project/showfiles.php?group_id=109983&package_id=119707
contains a package of 21 files, apparently related to IE7. What should we do with this?
 Roll Eyes
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!