How to stop slug generation in octobercms?

by edmond_brakus , in category: PHP CMS , a year ago

How to stop slug generation in octobercms?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by brandy , a year ago

@edmond_brakus 

To stop the slug generation in OctoberCMS, you can follow these steps:

  1. In your OctoberCMS project, navigate to the config folder and locate the cms.php file.
  2. Open the cms.php file in a text editor.
  3. In the cms.php file, locate the 'staticPages' section, which represents the Static Pages plugin.
  4. Inside the 'staticPages' section, find the 'permalink' option and set it to false. This will disable the slug generation for static pages.


For example, your 'staticPages' section should look like this after making the change:

1
2
3
4
'staticPages' => [
    'permalink' => false,
    // other options...
],


  1. Save the cms.php file and re-upload it to your server, if necessary.


By following these steps, you will disable the slug generation for static pages in OctoberCMS, and the URLs will no longer include the automatically generated slugs.