Support forums : Feature Requests

multiple templates, one style sheet

Now that you've read stuff first and introduced yourself, the next thing you'll probably want to do is say what you want Quam Plures to have and do. So here ya go: A feature request forum!

Moderator: Dracones

multiple templates, one style sheet

Postby EdB » Sun Jan 15, 2012 8:53 pm

Frequently what I do for clients is make a template named after their domain, but they want one "blog blog". So I end up with a template called "domain" and another called "domain_blog" ... and maybe others. All use basically the same style sheet with different PHP bits. For example on "non-blog blogs" there is not gonna be a contact form link or feedback and so forth.

So I got to thinking wouldn't it be nice if we had a way for core to say "this template calls for style.css but there is none so I shall now look for a template with the same basic name and see if it is there". In other words, 'domain_blog' template does not have a style.css so it looks in the 'domain' template instead.

I suppose I could handle it differently, and there's probably a good workable solution better than expecting core to figure stuff out, but anyway it's a thought. Saves multiple files to make the same style change across one installation is the idea.
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: multiple templates, one style sheet

Postby leeturner » Sun Jan 15, 2012 10:29 pm

Something like this perhaps - http://codex.wordpress.org/Child_Themes

I like the idea. As you said, there are other ways to do it via template settings or via blog specific stylesheets but this would be worth investigating.

L
leeturner
Dracone
User avatar
 
Posts: 730
Joined: Fri Dec 11, 2009 11:55 am
Location: Brighton, UK

Re: multiple templates, one style sheet

Postby EdB » Mon Jan 16, 2012 2:29 pm

I think I like "child templates".

Just roughing an idea in my head right now ... something we can put in the header.whatever.php file in a template that core understands to mean "use style sheet from XYZ template and pick up this template's style sheet if there is one". In a really fancy world, declaring a template as a child of another could also mean "this template only has over-ride files, so use these else use the parent template". So for example a child only needs a different single.file.php or whatever.

My biggest concern was the style sheet because that's the one I get pissed off about having to tweak, but heck any file I'm duplicating so one or two others could be tweaked are in the same situation.

Just something to think about I guess ...
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: multiple templates, one style sheet

Postby leeturner » Mon Jan 16, 2012 3:23 pm

EdB wrote:I think I like "child templates".

Just roughing an idea in my head right now ... something we can put in the header.whatever.php file in a template that core understands to mean "use style sheet from XYZ template and pick up this template's style sheet if there is one". In a really fancy world, declaring a template as a child of another could also mean "this template only has over-ride files, so use these else use the parent template". So for example a child only needs a different single.file.php or whatever.

My biggest concern was the style sheet because that's the one I get pissed off about having to tweak, but heck any file I'm duplicating so one or two others could be tweaked are in the same situation.

Just something to think about I guess ...


Not that different to what we have now I guess with the template specific files that fallback to the install files. This would just add another level of fallback. Sounds cool.

L
leeturner
Dracone
User avatar
 
Posts: 730
Joined: Fri Dec 11, 2009 11:55 am
Location: Brighton, UK


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron