We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16633
    • 116 Posts
    With wayfinder you can ignore hidden and list resource ids to ignore. Is it possible to ignore containers? I am open to extending the wayfinder snippet is someone can explain how to add this functionality if it cannot be done already.

    Thanks.
      --
      Landon Poburan
      Web Designer and Developer

      http://www.categorycode.ca
      http://www.landonp.com
      • 33968
      • 863 Posts
      You could check the ’Hide from Menus’ box in the manager for each container you want to ignore.

      Otherwise depending on your document structure it might be better to use Ditto (hideFolders=`1`) or getResources (hideContainers=`1`).
        • 16633
        • 116 Posts
        Quote from: lucas at Mar 11, 2011, 03:28 AM

        You could check the ’Hide from Menus’ box in the manager for each container you want to ignore.

        Otherwise depending on your document structure it might be better to use Ditto (hideFolders=`1`) or getResources (hideContainers=`1`).

        Yes I know I can check off Hide From Menus but I am trying to reduce the work for the clients managing the website as much as possible. This is the a blog so if they add a new category it shows up in the navigation which I do not want. If I can hide it from the nav without having them having an extra step of checking that box that is ideal.
          --
          Landon Poburan
          Web Designer and Developer

          http://www.categorycode.ca
          http://www.landonp.com
          • 33968
          • 863 Posts
          That’s fair enough - I try to let modx handle as much as possible too, leaving the client to just do what they need to do.

          In this case you could use Form Customization to set all containers in the blog section to ’hide from menus’... and then hide that field completely from the client user group. If you’re using Evolution you can use ManagerManager to accomplish the same.

          I guess you could also consider hard-coding the blog button into the nav menu?
            • 16633
            • 116 Posts
            Quote from: lucas at Mar 11, 2011, 11:45 AM

            That’s fair enough - I try to let modx handle as much as possible too, leaving the client to just do what they need to do.

            In this case you could use Form Customization to set all containers in the blog section to ’hide from menus’... and then hide that field completely from the client user group. If you’re using Evolution you can use ManagerManager to accomplish the same.

            I guess you could also consider hard-coding the blog button into the nav menu?

            Ok I have never used the Form Customizations before could you help a bit.
            Would I do the following:

            Create a profile, with the following sets:

            - Constraint field: parent, value: blog’s id
            - Contrraint field: hide from menu, value: 1

            ??

            How would I restrict it to only containers?

            Can I make it so all children of the blog are created with a specific template? If this is so this is SO helpful.
              --
              Landon Poburan
              Web Designer and Developer

              http://www.categorycode.ca
              http://www.landonp.com
              • 33968
              • 863 Posts
              I’ve not used it before either smiley

              BobRay seems to be pretty good with this - here’s a response he posted for a similar request.

              If your blog posts use a different template from the containers then it should be fairly simple. If not, then I wonder if it’s possible to apply rules to documents with a specific parent (ie. Blog container), and which are containers.

              Will try it out but it’s Friday evening now - hopefully someone else can chime in now smiley
                • 33968
                • 863 Posts
                One more thought...

                Depending on how deep you want your nav menu to go, you could limit the Wayfinder output to the level above the blog posts.

                Eg. if your blog structure is Blog/Category/Blog Post, you could use &level=`2` in your Wayfinder call which would only go as far as Category depth.

                I still want to crack Form Customisation though!
                  • 16633
                  • 116 Posts
                  I have got the customization working with the Categories. But not the structure is:

                  Blog/Cat/Post

                  So I want to make the Posts have a default template. Since they are children of the Cat they default to have the Cat template. I am trying to figure out how to target this 3rd level under the blog.
                    --
                    Landon Poburan
                    Web Designer and Developer

                    http://www.categorycode.ca
                    http://www.landonp.com
                    • 33968
                    • 863 Posts
                    Quote from: landonpoburan at Mar 11, 2011, 12:57 PM

                    So I want to make the Posts have a default template. Since they are children of the Cat they default to have the Cat template.

                    I found this great package for Evo that allows you to specify a different template for children of a container: Inherit Selected Template

                    Will look at trying to convert it for Revo as its almost a must-have for sites with a Blog or News section.

                    Would you mind posting your Form Customization rules here? The docs are still a bit behind in this area so it would be great to have some examples in the forum smiley
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      In Evo at any rate you can set a Configuration setting to use sibling’s template or parent template or site default template.
                        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