Topic: [Snippet] ListChildOrSibs  (Read 10328 times)

Pages: [1]   Go Down

#1: 19-Dec-2005, 10:59 AM

Coding Team

jaredc
Posts: 300

Description-

This snippet was designed to show all child pages, or siblings if there are no children pages, with or without descriptions, in a list. If is configurable in a multitude of ways to allow you to define how you want unpublished folders and so forth to impact the presentation of the menu.

I'll be keeping a changelog and the current version of this snippet in this post. The changelog is mostly for myself - but if others are curious, they can witness the evolution (or is it insanity) themselves.

* ListChildOrSibs0_6_l.txt (8.55 KB - downloaded 1045 times.)
* ListChildOrSibs_ChangeLog.txt (1.38 KB - downloaded 711 times.)
« Last Edit: 19-Dec-2005, 11:13 AM by jaredc »
Standard Disclaimer
I could be totally wrong.

#2: 19-Dec-2005, 11:59 AM

Marketing & Design Team

davidm
MODx evangelist
Posts: 7,073

The best way to predict the future is to invent it

WWW
I'll test it right now, I already like the idea Smiley

I'll give you some feedback once I have played a little with it... anyway, Thanks !
.: 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.67 - PHP 5.2.8 | 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

#3: 19-Dec-2005, 11:34 PM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
cool.  Does it now respect the "Show in Menu" check box?

-sD-

#4: 20-Dec-2005, 09:36 AM

Coding Team

jaredc
Posts: 300

Indeed it does. Aside from changing $etomite-> objects to $modx-> objects, I integrated a check for hidemenu (show in menu checkbox).
Standard Disclaimer
I could be totally wrong.

#5: 21-Dec-2005, 06:18 PM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
I get this error:
Quote
« Execution of a query to the database failed - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'hidemenu=0AND hidemenu=0 AND (sc.privateweb=0) ORDER BY s »

Any ideas what is causing that?

-sD-

#6: 21-Dec-2005, 07:10 PM

Coding Team

jaredc
Posts: 300

Yes. As a matter of fact I do. It's a bug in one of the API functions. It's fixed for the next release... though I know that doesn't help you now Wink

You could wait for the next release or read the bug tracker for the fix.
Standard Disclaimer
I could be totally wrong.

#7: 22-Dec-2005, 06:28 AM

Testers

Dimmy
Posts: 2,001

Я не говорю по-русски 私は日本語を話さない

WWW
Nice work Jared I am using this a lot
Are you also planning to confert the rest of your awsome snippets?

#8: 22-Dec-2005, 08:59 AM

Coding Team

jaredc
Posts: 300

Slowly but surely yes. I am planning to convert (and upgrade where possible) many of my snippets. Some changes will be minor, some will be quite extensive. Stay tuned!
Standard Disclaimer
I could be totally wrong.

#9: 22-Dec-2005, 04:34 PM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
Yo jaredc!

thanks a lot.  I replaced those lines of code in the document parser class and now LCOS has retaken the throne as Scotty D's most favorite-est snippet ever!!!

thanks again

-sD-

#10: 22-Dec-2005, 09:04 PM

Coding Team

jaredc
Posts: 300

Quote from: ScottyDelicious link=topic=1892.msg13393#msg13393 date=1135290843... LCOS has retaken the throne as Scotty D's most favorite-est snippet ever!!![/quote

Wow. Favorite-est snippet. I think that's the highest award I've ever won for a snippet. Thank YOU!  Wink
Standard Disclaimer
I could be totally wrong.

#11: 23-Feb-2006, 09:55 AM

Duane
Posts: 51

I'm not the world's most experienced code hacker, so I hope you'll excuse this question. Is there a way to order the list by menu id instead of alphabetically?

Thanks,
Duane

Okay, never mind. LOL. I just had to add id ASC to the front of the ordering list. Doh! Great snippet, btw. The perfect solution for my need!
« Last Edit: 23-Feb-2006, 12:44 PM by Duane »

#12: 3-Mar-2006, 09:17 AM

jwtyler
Posts: 93

Hacking with minimal knowledge

WWW
I know this may sound insane but I need LCOS to IGNORE the show in menu check box.  The reason is I have a general site menu on left side and a dept specific menu on right menu. With documents not to appear in left menu using unchecked show in menu to filter.  Is this possible with an option? I read the code to try to hack the show in menu check out...  no luck. my php is bad.


edit - Ah, I need to clarify. This is in a template call. So that users can have a template to apply to a folder where children of that folder are listed in the right menu, but not in the site wide left menu.


Any help thanks...

JT
« Last Edit: 3-Mar-2006, 10:13 AM by jwtyler »

#13: 8-Dec-2006, 12:04 PM

Spheerys
Posts: 208

Hi jaredc and thanks for this snippet Smiley

I just need a new configuration setting : I would show on the same page all of the children pages AND all of their respective children like this :
  • Element 1 (first child of main section)
    • First child of the Element 1
    • Second child of the Element 1
    • Third child of the Element 1
    • Fourth child of the Element 1
  • Element 2 (first child of main section)
    • First child of the Element 2
    • Second child of the Element 2
  • Element 3 (first child of main section)
    • First child of the Element 3
    • Second child of the Element 3
    • Third child of the Element 3

Is it possible to develop this setting ? Smiley
Thanks Wink
« Last Edit: 8-Dec-2006, 01:08 PM by Spheerys »

#14: 9-Dec-2006, 04:49 AM

Testers

Dimmy
Posts: 2,001

Я не говорю по-русски 私は日本語を話さない

WWW
You could use Wayfinder for that

#15: 9-Dec-2006, 11:40 AM

Spheerys
Posts: 208

You're right Smiley
I will use Wayfinder Wink
Pages: [1]   Go Up
0 Members and 1 Guest are viewing this topic.