We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38850
    • 110 Posts
    I have installed the Collections package and so I created a tree like this in resources:

    Blog
    - News << the collection

    I assume how collections would work is that under "Blog" I would basically create my blog "categories" as collections like "News" or "How to" etc.

    Anyway, I'm trying to make sense of the MODX settings for FURLs.

    I would think that my URLs would look like example.com/blog/news/article-title.html

    Instead, it is EITHER .com/blog OR .com/news OR .com/article-title.html

    I found the option to use the friendly alias path. This is closer to what I want, but not quite. I don't particularly want the /blog/ top-level, since this is a small site and I can easily just do /news/ or /how-to/ without needing the /blog/ top-level.

    The explanation of the use_alias_path makes it sound like it only uses the alias IF the alias is actually set. This doesn't seem to be the case. I removed the alias from the Blog container but FURL still uses it when creating links.

    So basically, how can I use FURL and simply drop the top-level /blog/ alias, but still use that as my container? Can this only be done via rewrite rules?

    thx
      • 4172
      • 5,888 Posts
      why do you put the categories under "Blog", when you want them to be in the root?

      You can freeze the Url for each resource. This can also be done by a plugin automatically.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 38850
        • 110 Posts
        Quote from: Bruno17 at Oct 07, 2014, 05:39 AM
        why do you put the categories under "Blog", when you want them to be in the root?

        You can freeze the Url for each resource. This can also be done by a plugin automatically.

        1) I just figure if I'm going to have a blog, it should be organized under a Blog entry in the tree, this seems to be a common pattern.

        2) I do want the "Blog" root to be its own landing page which is essentially the start of the whole blog area of the site and will have its own template etc. If all my categories are just scattered in the root, then how would I make a single "Blog" landing page and make category menu without including everything else in the root?

        3) I'm not familiar with freezing URLs, not sure what that means if the use_alias_path is set. Does it freeze only its own alias or freezes the whole alias path? Or do you type an actual path into the alias like "/something/else" and freeze that? What does freeze alias do and would I have to now change this on every single new post?

        Thanks!
        • You can have news, tutorials, demos, articles, blog, all kinds of categories. In a situation like that, you would have as many Collections container resources in the root as you need.

          Actually I tend to use multiple Collections containers simply to avoid having the Tree cluttered up with the resources for any given category.

          For example, I have one site where the landing page has a rotating gallery, and each image links to a page with more information. I have these resources, with the image TV that the gallery is made from, as children of the landing page, and the landing page itself is a Collections container so those child pages don't show in the Tree. This site also has a Blog container, also in the Tree root. [ed. note: sottwell last edited this post 9 years, 6 months ago.]
            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
            • 38850
            • 110 Posts
            I don't think I'm following exactly. If I put the collections all on the root, this will prevent me from using something like wayfinder since I don't want it to include other root items and I don't want to have to manually manage an "ignore" list in the snippet.

            The question is, I want to have a "Blog" container (which is not a collection) and under that is a bunch of collections which are blog categories. I assume this is a valid way to organize things? Now all I want to do is not have "/blog/" in the URL for each category and article. So I want "example.com/category/article" and not "example.com/blog/category/article".

            Is this possible?
              • 40045
              • 534 Posts
              I guess you could do that by fixing the URI for your blog posts, there you could just remove the /blog/part from the URI, but if you have a lot of posts, it would probably be easiest to write a plugin OnDocFormSave that handles that for you...