How to separate content from design with smarty?

Discussion for various published PHP frameworks, including Zend Framework, CodeIgniter, Kohana, CakePHP, Yii, Symfony, and others.

Moderator: General Moderators

Post Reply
toplisek
Forum Commoner
Posts: 31
Joined: Tue Apr 11, 2006 1:23 pm

How to separate content from design with smarty?

Post by toplisek »

I have tested Smarty folder structure. How to set correct text within tpl?

Should be include file with content on the left hand side of website
like:
1. {include file="text_area.tpl"} or
I set
2. <?PHP @require_once dirname(__FILE__).'/smarty/templates/text_area.php';?>
User avatar
waytoecommerce
Forum Newbie
Posts: 16
Joined: Tue Apr 12, 2011 11:47 am

Re: How to separate content from design with smarty?

Post by waytoecommerce »

to include php in smarty you have to use {php} include('text.php'); {/php}


thanks!
waytoecommerce.com
toplisek
Forum Commoner
Posts: 31
Joined: Tue Apr 11, 2006 1:23 pm

Re: How to separate content from design with smarty?

Post by toplisek »

What is correct way to edit content in Smarty which is separate file from other form (design, sections, content)
User avatar
waytoecommerce
Forum Newbie
Posts: 16
Joined: Tue Apr 12, 2011 11:47 am

Re: How to separate content from design with smarty?

Post by waytoecommerce »

if you want to edit content in smarty you can use {* comment *}.

also please clear out your problem .... so, that i can explain it to you in details.
toplisek
Forum Commoner
Posts: 31
Joined: Tue Apr 11, 2006 1:23 pm

Re: How to separate content from design with smarty?

Post by toplisek »

Sorry not to be clear.
We have at website the following:
CSS, text, PHP code (applicaton).

I like to give user access to just text content. I think with included file will be solved. How to solve this with cooment in correct way. Is this just as your sample?
User avatar
waytoecommerce
Forum Newbie
Posts: 16
Joined: Tue Apr 12, 2011 11:47 am

Re: How to separate content from design with smarty?

Post by waytoecommerce »

yes it's a sample if you give me access then i can be able to solve your problem ....thanks!
Post Reply