Dec 04, 2008, 12:35 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  
News:Donate to MODx: Donations
Pages: [1]   Go Down
  Print  
Author Topic: DropMenu - Can startDoc Be Rendered in Menu?  (Read 1271 times)
0 Members and 1 Guest are viewing this topic.
ddecjc
Member
**
Posts: 61



« on: Apr 05, 2006, 01:59 PM »

Is it possible to set up a DropMenu such that the folder I use as the startDoc is rendered as a link in the menu? The default (and maybe the only) behavior is that the startDoc folder/doc is not rendered--only it's children.

Say I have the following document structure...

Folder1 ( 1 )
 - Doc1 ( 2 )
 - Doc2 ( 3 )
 - Doc3 ( 4 )
Folder2 ( 5 )
 - Doc4 ( 6 )
 - Doc5 ( 7 )
Doc6 ( 8 )  //notice that this one is at the site root level
Doc7 ( 9 )  //notice that this one is at the site root level

Can I set up a DropMenu with a startDoc of "1" but make it so that "Folder1" appears in the menu with Doc1, Doc2, and Doc3 as <li>'s underneath it?

If it's not possible now, has this ever been proposed or considered as a future enhancement?

EDIT: I just realized that startID is for NewsListing while startDoc is for DropMenu. I had it correct in the code for my site, but I was getting them mixed up as I typed.
« Last Edit: Apr 06, 2006, 07:12 AM by ddecjc » Logged

Dave
ddecjc
Member
**
Posts: 61



« Reply #1 on: Apr 06, 2006, 07:10 AM »

I guess another way to accomplish the same thing would be to allow DropMenu to have some sort of filter so that I could have startDoc be "0" but tell it to filter so that only "Folder1" is displayed.
« Last Edit: Apr 06, 2006, 07:12 AM by ddecjc » Logged

Dave
anselm1109
Jr. Member
*
Posts: 15



WWW
« Reply #2 on: Apr 20, 2006, 07:18 PM »

I'm pretty new to Modx, but I don't think that this is (currently) possible. My working solution is to create a TV that contains the link for the start doc foloder and set the default value of it to an @INHERIT binding. So then I only have to set the link for the top most folder.

In other words:

template looks like this:
Code:
<div id="sidebar">
<ul>

<li id="dropmenu">
                        <ul><li>[*SubMenuHeader*]</li></ul>
[!DropMenu?levelLimit=2&startDoc=[[UltimateParent]]!]
</li>
                   
                        <li id="feeds">
                        [*RecentArticles*]
                        </li>

</ul>

and my template variable called [*SubMenuHeader*] is a simple text variable with the default value set to the following:

Code:
@INHERIT <a href="index.php?id=15">Symposium</a>

Then I just change the template variable for each top level folder and leave it blank on the sub pages.

Hope that helps!

I would love to see this option built into DropMenu!
Logged
Pages: [1]   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!