Jump to content

How do I hide parts of the URL?


Boost
 Share

Recommended Posts

 Hi,

The processblog module is great, but there is one thing that bugs me. It's the URL structure. Today I use:

/mysite/example-post/
/mysite/categories/example-categories/

Would it be possible to remove the "categories" from the URL? I'd like to accomplish the following:

/mysite/example-categories/example-post

Thanks!

Link to comment
Share on other sites

Yes, it's possible to remove the "categories" from the URL structure in the processblog module. Here's how you can do it:

  1. In the ProcessBlog module configuration, go to the "Categories" tab.

  2. Edit the "Template for category URLs" field by replacing "categories/" with an empty string. For example, if the current value is:

/mysite/categories/{slug}/

change it to:

/mysite/{slug}/

  1. Save the changes.

  2. Next, edit the "Template for post URLs" field by adding "{category}/" before the "{slug}" placeholder. For example, if the current value is:

/mysite/{slug}/

change it to:

/mysite/{category}/{slug}/

  1. Save the changes.

  2. Finally, regenerate the URLs for all your posts and categories by going to the "Tools" tab and clicking on the "Regenerate URLs" button.

After completing these steps, your category URLs will be in the format "/mysite/example-categories/" and your post URLs will be in the format "/mysite/example-categories/example-post/". The "categories" part of the URL will be removed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...