-
- 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
-
- 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 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.]
-
- 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?
-
- 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...