I was wondering if it is possible to use a different templating engine without entirely rewriting everything. Can that be done with a plugin or does it need to be rewritten to do that. The templating engine I want to use is Savant, in case you were wondering.
John
Can I use a different template engine?
Re: Can I use a different template engine?
Hi
Well, you have to write your own template_api.inc, similiar to the one used in /includes, when you dont want to use smarty at all. I dont think it does make sense to do so using savant, which isnt really proccessing to be a real alternative. Else you could use the template_api and the default-php template to write a template with php only.
Ian
Well, you have to write your own template_api.inc, similiar to the one used in /includes, when you dont want to use smarty at all. I dont think it does make sense to do so using savant, which isnt really proccessing to be a real alternative. Else you could use the template_api and the default-php template to write a template with php only.
Ian
Re: Can I use a different template engine?
Well, the reason I ask is that we use Savant for all the websites we develop, and it would be nice to use Savant for the blog templates, so we can use the same templates (header.tpl, footer.tpl) to make the site and the blog look the same.
I'll give it a try and see how it goes.
Thanks,
John
I'll give it a try and see how it goes.
Thanks,
John
Re: Can I use a different template engine?
Hi
Serendipity will still make use of smarty internally, even if you add savant via a template_api.
I think, it would be a lot easier to convert the savant templates to smarty templates, particulary if you only mean to copy header.tpl and footer.tpl.
Ian
Serendipity will still make use of smarty internally, even if you add savant via a template_api.
I think, it would be a lot easier to convert the savant templates to smarty templates, particulary if you only mean to copy header.tpl and footer.tpl.
Ian
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Can I use a different template engine?
Hi!
Regards,
Garvin
What do you mean? The template_api completel replaces the Smarty object. No smarty will be involved, if you choose to create a Svant template API model...Timbalu wrote:Hi
Serendipity will still make use of smarty internally, even if you add savant via a template_api.
I think, it would be a lot easier to convert the savant templates to smarty templates, particulary if you only mean to copy header.tpl and footer.tpl.
Ian
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Can I use a different template engine?
Hi Garvin
Yes, in the frontend, AFAIK. The template_api.inc explicitly says
Ian
Yes, in the frontend, AFAIK. The template_api.inc explicitly says
Code: Select all
The Serendipity Admin backend will still make use of Smarty. It rocks.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Can I use a different template engine?
Hi!
Ah, I think I added that as a general statement to indicate that the backend has special needs and that custom template APIs might not do the job there - and also that the core s9y backend is not really templatized overall. But you're right, it's good to mention this.
The way I understand it though, is that the frontend is more important for jabeavers?
Regards,
Garvin
Ah, I think I added that as a general statement to indicate that the backend has special needs and that custom template APIs might not do the job there - and also that the core s9y backend is not really templatized overall. But you're right, it's good to mention this.
The way I understand it though, is that the frontend is more important for jabeavers?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Can I use a different template engine?
What is true now? Is it a complete remove or just a disable and replace for all frontend output?garvinhicking wrote:The template_api completel replaces the Smarty object. No smarty will be involved, if you choose to create a Svant template API model...
Yes.garvinhicking wrote:The way I understand it though, is that the frontend is more important for jabeavers?
Thats why I thought it would be easier to convert savant to smarty, than vice versa.
Ian
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Can I use a different template engine?
Hi!
The template API only wraps the calls to smarty that are relevant for the frontend. I believe there are some calls that we need in the backend to other methods of the Smarty object, that are not part of Template API (but could be). So actually I would need to study the code for that again, but I'm too short in time right now...
I do understand jabeavers need to have a unified templating structure, so that if multiple people are savy with savant, that they should use this template API instead of Smarty. In the usual case, only frontend templates need adapting, so once the groundwork for a Savant template API class is done, nobody in his team would need to know of Smarty. Also, it would be nice to see someone finally having a stab at the template API for s9y, so that we could maybe improve it to work better with savant and put it up as a plugin/template...
Regards,
Garvin
The template API only wraps the calls to smarty that are relevant for the frontend. I believe there are some calls that we need in the backend to other methods of the Smarty object, that are not part of Template API (but could be). So actually I would need to study the code for that again, but I'm too short in time right now...
I do understand jabeavers need to have a unified templating structure, so that if multiple people are savy with savant, that they should use this template API instead of Smarty. In the usual case, only frontend templates need adapting, so once the groundwork for a Savant template API class is done, nobody in his team would need to know of Smarty. Also, it would be nice to see someone finally having a stab at the template API for s9y, so that we could maybe improve it to work better with savant and put it up as a plugin/template...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Can I use a different template engine?
Good to know. I just wanted to have it clear in this question.garvinhicking wrote:The template API only wraps the calls to smarty that are relevant for the frontend.
Yes, that would be nice to have. Please go, jabeaversgarvinhicking wrote:Also, it would be nice to see someone finally having a stab at the template API for s9y, so that we could maybe improve it to work better with savant and put it up as a plugin/template...
Ian
Re: Can I use a different template engine?
Wow, thanks all for the discussions and tips. I will certainly look at this when I have time. I'll let you know how it goes.
John
John