Folder templates/default to share files between templates?

Folder templates/default to share files between templates?

Postby cactusman on Wed Apr 09, 2008 11:36 pm

Hi!

I red on the wiki about the blogs templates that if if the program can't find a file on the template folder, he goes to the default folder to find it.

I had a little problem :
Everytimes I wanted to change a little thing to my templates (new menu option....) I had to modify every single template one by one !
But all my template are very similar, only some color of the text and the top picture are different.

So I tried to delete the files which are exactly the same in each folder and put them in the default folder.
I even divided the css file in two so only the part I modify is still in each blog template.
And it work!
So next time if I want to modify the menu in exemple I only have to change one footer.template file located in the folder default !

So I'm happy but I wonder if it may have bad consequences? Do you think I might have any problem after this change ?
cactusman
 
Posts: 73
Joined: Sun Feb 25, 2007 4:55 am
Location: Japan
LifeType Version: 1.2.8

Re: Folder templates/default to share files between templates?

Postby jondaley on Thu Apr 10, 2008 3:48 am

Nope, that is exactly correct. We have talked about changing the templates so most of them do that, but no one has gotten around to checking all of them to see which one could simply have their files erased.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Folder templates/default to share files between templates?

Postby cactusman on Thu Apr 10, 2008 7:06 am

Thanks !

That's a very good news !
cactusman
 
Posts: 73
Joined: Sun Feb 25, 2007 4:55 am
Location: Japan
LifeType Version: 1.2.8

Re: Folder templates/default to share files between templates?

Postby Nomad on Wed Jun 04, 2008 8:38 pm

jondaley wrote:Nope, that is exactly correct. We have talked about changing the templates so most of them do that, but no one has gotten around to checking all of them to see which one could simply have their files erased.


you j - I was thinking about this and from my messing (offline) I reckon most templates could near enough - well the simple ones that is - run of just a css and basic header/footer in the template folder. The problem I saw was that when folk were making templates - they were giving differing names to class's and id's - especially in the navigation bars.

I don't have my linux server hd on at the moment but I'll take a look at it again (If I can get bloody time 'gnnnnn') - I'm sure I had the three or four standard templates working like this. Had only the css/header and footer in the template folder and everything else in the default (just the one set of files) - worked ok or seemed to anyway....

Personally I think it would radically simplify the templates and to change anything or change a design would mean just editing the css - that would be so simple. Building on that with a jquery or ajax css editor maybe via the admin panel (Or a plugin?) to edit a template style....

It comes down to though getting all the templates to work on standardised values for class's and id's

i.e some templates use the footer, some use panel and some use links for the navigation column. Personally (As I've always said) I think that is what is wrong. They should all be in one format and any new templates added should retain that structure or be rejected...

Actually if you go by what I've said at the beginning and it was more css based with say just the header and maybe footer in the template folder and all other files are default, then that would make everything pretty much standardised anyway...
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Re: Folder templates/default to share files between templates?

Postby jondaley on Thu Jun 05, 2008 6:09 am

Yeah, I kind of agree with you, but in terms of rejecting a template when submitted, I figure if it looks good, and doesn't have errors, it should be accepted. I think it is nice to have lots of templates available, rather than worrying about what the files are called. I think if we have a system/standard that works well, designers will use it.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch


Return to Templates

cron