Re: dreamweaver templates
| From: | Alan Knowles | Date: | Thu, 20 Nov 2003 06:04:15 +0000 |
| Subject: | Re: dreamweaver templates | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9048@lists.php.net to get a copy of this message | ||
<plug>
You could have a look at HTML_Template_Flexy,
- it has a plugin compiler design so you could write your own compiler very easily..
- there is a tokenizer for html in there. (although I'm not sure if it will handle this type of comments well (as it tree builds by default, and may make a mess of this..)
- It's trying to get multiple template engines into pear, without multiple packages... (by providing different backend compilers depending on user preferences..)
</plug>
Regards
Alan
Nick Nettleton wrote:
It's not really PEAR, but if the template has a syntax like <!-- InstanceBeginEditable name="title" --> ... <!-- InstanceEndEditable --> Then how about: <? $template = "template.dwt" ; $content = array( "title" => "Here's my title" , // etc ) ; $find = '/<\!-- InstanceBeginEditable name="([^"]+)" -->.*<\!-- InstanceEndEditable -->/iseU' ; $replace = '$content["\\1"]' ; $in = join('', file($template)) ; $out = preg_replace($find, $replace, $in) ; print $out ; ?> Nick ----- Original Message ----- From: "Paul Wolstenholme" <wolstena@sfu.ca> To: "Ryan King" <RyanSKing@mac.com> Cc: <pear-general@lists.php.net> Sent: Wednesday, November 19, 2003 11:42 PM Subject: Re: [PEAR] dreamweaver templates-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comAs far as I know, Dreamweaver templates are just regular html files with special html comments that are used by Dreamweaver to determine what areas are editable. PHP will more than likely just ignore these comments. /Paul On 19-Nov-03, at 3:12 PM, Ryan King wrote:On Wednesday, November 19, 2003, at 02:56 PM, Paul M Jones wrote:-- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpOn Nov 19, 2003, at 2:02 PM, Ryan King wrote:To clarify some more... instead of using Smarty or php (as savant apparently does) for markup, I want to use the Dreamweaver style markup, have it parsed and used by php scripts. ryan ------------------- http://homepage.mac.com/ryansking/ -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpDoes anyone know of a php package that handles Dreamweaver templates? I'm working on a new project in which that functionality would be very useful.Whe you say "handles" Dreamweaver templates, what exactly do you mean? (Some of us are still hand-coding vampires and shrink from the bright light of WYSIWYG tools. ;-)