We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15196
    • 18 Posts
    Sorry to post again, but I can’t get this to work ...

    In the dropmenu some links are folders and some are documents.
    When the link is a folder, it should display a folder as bullet - when the link is a document it should show a document as bullet. So it doesn’t mean make all items on level 2 with bullet A and all items on level 3 with bullet B, I just need it to recognise the document type and place the correct bullet accordingly.

    Secondly, would it be possible to make a navigation like /Home/Folder1/Subfolder1/CurrentDocumment - so the user always knows on which level he/she is and can navigate on this?

    Thirdly, is there some kind of a rating system?

    4th:
    [!DropMenu?activeTreeOnly=true&startDoc=40&orderBy=pagetitle&showDescription=true!]
    can I make this dynamic somehow? I need the startDoc to be dynamic, so that I don’t need to put this on each page
    I tried putting in php tags but get parse errors

    thanks, again, in advance for your great help peeps cool
      • 7923
      • 4,213 Posts
      Quote from: k4l4sh at Jul 24, 2006, 11:54 AM

      In the dropmenu some links are folders and some are documents.
      When the link is a folder, it should display a folder as bullet - when the link is a document it should show a document as bullet. So it doesn’t mean make all items on level 2 with bullet A and all items on level 3 with bullet B, I just need it to recognise the document type and place the correct bullet accordingly.
      Like I allready answered to your previoust post about this, it’s not possible with DropMenu without making some changes to the snippet. It will be possible with the dropmenu’s successor though.

      Quote from: k4l4sh at Jul 24, 2006, 11:54 AM

      Secondly, would it be possible to make a navigation like /Home/Folder1/Subfolder1/CurrentDocumment - so the user always knows on which level he/she is and can navigate on this?
      Use the Breadcrumbs snippet what can be found from resource repository. (you can search resources using the site search or find by alphabet)

      Quote from: k4l4sh at Jul 24, 2006, 11:54 AM

      Thirdly, is there some kind of a rating system?
      There is a document star rating snippet in the resource repository, use the link above.

      Quote from: k4l4sh at Jul 24, 2006, 11:54 AM

      4th:
      [!DropMenu?activeTreeOnly=true&startDoc=40&orderBy=pagetitle&showDescription=true!]
      can I make this dynamic somehow? I need the startDoc to be dynamic, so that I don’t need to put this on each page
      I tried putting in php tags but get parse errors
      Make a snippet to return the startDoc value, so it would be something like:
      [!DropMenu?activeTreeOnly=true&startDoc=[[Snippet]]&orderBy=pagetitle&showDescription=true!]

      Many use for example the UltimateParent snippet with dropmenu to get the first item from the tree to the startDoc for sidebar menus etc.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 34162
        • 1 Posts
        Make a snippet to return the startDoc value, so it would be something like:
        [!DropMenu?activeTreeOnly=true&startDoc=[[Snippet]]&orderBy=pagetitle&showDescription=true!]
        I’ve done this using a TV. Seems to be more convenient, esp. from an editing-view.
        Due to some strange behaviour, I had to put the whole DropMenu-call into the TV, not just the startDoc-ID.
        Not a big difference, though. Using dynamic params for DropMenu seems to have some flaws, which can be overcome by "dynamising" the DropMenu-Usage as a whole.
          • 15196
          • 18 Posts
          it’s all working, so thanks for the good tips

          My last question though as the dropmenu is giving me hell to configure, I need to give it a special style for ul which should not apply to other ul tags on the site.
            • 7923
            • 4,213 Posts
            Quote from: k4l4sh at Jul 26, 2006, 08:58 AM

            My last question though as the dropmenu is giving me hell to configure, I need to give it a special style for ul which should not apply to other ul tags on the site.
            Use the &topdiv and &topdivClass parameters to make it wrap the whole menu in a div, then in you css use that div class to point to ul tags inside that div. (.classname ul)


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • As you get more experience with CSS, you will learn to be sure to give all of your containers and elements IDs and classnames for styling.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 15196
                • 18 Posts
                something like this?
                [!DropMenu?activeTreeOnly=`true`&topdiv=`true`&topdivClass=`navigation`&orderBy=`pagetitle`&menuName=`SideNav`&currentItemClass=`currentclass`!]


                sadly, it’s not working

                .navigation ul {
                				padding-left: 2px;
                				margin-left: 0.2em;
                				margin-top: 0.2em;
                				margin-bottom: 0.2em;
                				list-style-image: url('/images/folder.gif')
                				}


                huh
                  • 34162
                  • 1 Posts
                  As far as I know "list-style-image" is a property of "li" items, not of "ul".
                  And, as my old reference-book notes, this property is not too well supported and suggests to use "background-image" instead.
                    • 15196
                    • 18 Posts
                    I got it
                    I had to define a class and an id


                    EDIT
                    guess who’s back

                    			#navigation
                    				{
                    				margin-left: 0;
                    				padding-left: 0;
                    				list-style: none;
                    				}
                    			.navigation li
                    				{
                    				padding-left: 2px;
                    				margin-left: 0.2em;
                    				margin-top: 0.2em;
                    				margin-bottom: 0.2em;
                    				list-style-image: url('/images/folder.gif');
                    				}
                    			.currentclass {
                    				padding-left: 2px;
                    				margin-left: 0.2em;
                    				margin-top: 0.2em;
                    				margin-bottom: 0.2em;
                    				list-style-image: url('/images/folderopen.gif')
                    				}


                    I’m not too worried about the list-style-image as long as it works in IE (our standard compagny browser) it’s fine

                    my problem is, my currentclass doesn’t work anymore :’(


                    RE-EDIT
                    it’s working now
                    (li.currentclass did the trick)