Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only add suffix if it is not set to false
Removing the urlSuffix in Page.php by setting it to false works in source, but javascript adds it again. Resulting in link with undefined at the end. **Setting URLSuffix to false, if page is published:** ``` public function getCMSFields() { $fields = parent::getCMSFields(); if( $this->isPublished() ) { $fields->FieldByName('Root.Main.URLSegment')->setURLSuffix(false); } } ``` See issue: silverstripe#2723 silverstripe#2723
- Loading branch information