Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Is the default style (default.css) mandatory?
I’m designing a theme that doesn’t use the default style, so default.css
doesn’t exist in the file tree. The theme is assigned to a single section, which uses a different, non-default style in its settings. In theory, there should be no need for the default style to exist in the admin-side: no sections use it for that theme, and since it doesn’t exist in the file tree locally or remotely, there’s no need for it to created when I update the theme from disk.
When I update an existing theme from disk, the default style is created with its default content. The only reason I can think of for this happening – aside from being a bug – is that default style is essential…but it’s demonstrably not since it can be deleted if no sections are using it.
Textpattern 4.9.0 beta 2. Zero Pete esoterica / funny business in effect.
Any advice gratefully received. Thank you.
Last edited by gaekwad (Today 11:55:51)
Offline
Re: Is the default style (default.css) mandatory?
This could be construed a bug. Probably because a section has to have at leat one CSS file and at least one page, the theme importer is cautious and assumes that if there’s isn’t a default.css and default page in your database, that you need one of each.
It could be a bit cleverer and check if you have at least one page+style assigned to a section and, if so, skip asset creation. Pretty sure there’s an array defined in the Skin class for “essential” content and these particular names fall in that camp.
Current workaround: delete the placeholder it created and rename your real CSS file default.css
.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Is the default style (default.css) mandatory?
Thanks, Bloke – makes sense. I’ll work around it for now.
Offline