-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why can't a section both have hasUrls set to false and a template configured? #3830
Comments
It worked with these new Section_SiteSettings([
'siteId' => $site->id,
'hasUrls' => true,
'uriFormat' => '__home__', // This is a magic keyword, apparently
'template' => 'myTemplate',
]); |
If you don’t want the section to have URLs, then you should just leave the |
@brandonkelly, that's what I thought, but that threw a validator error saying |
@pieterbeulque The only time |
OK, then it threw the validation error because it was a single. Thanks for clarifying this, @brandonkelly! |
cms/src/services/Sections.php
Lines 649 to 655 in e97588f
I'm having trouble using
Craft::$app->sections->saveSection($section)
to create a section with settings configured like this:Am I trying to do something that I shouldn't try to do or is this a bug?
The text was updated successfully, but these errors were encountered: