Le mercredi 23 avril 2008 à 17:49 +0200, Christoph Frick a écrit : > On Wed, Apr 23, 2008 at 05:07:47PM +0200, Guillaume Lecanu wrote: > > > > Like index.php and about.php have the same menu, I have added a > > /templates/macros.html page. In this macros.html, I have added the > > menu div with the attribute metal:define-macro="menu". In the 2 > > others templates pages, I have set the menu sample to uses the > > macros.html version, for that I have used > > metal:use-macro="macros.html/menu" > > You should read up the parts about define-slot and fill-slot in the > phptal docs.
Yes I have read it, but I haven't really understand the concept of slots. But I have just found a solution with macros. I know have a /templates/template.html with the proper html/head/body and I call the macro on the body tag I call the content of the other page : metal:use-macro="$template/content" $template is the template file name of the template to see (from $_SERVER['SCRIPT_NAME']) Like that, all working like I want, Thanks for your help ! > > _______________________________________________ > PHPTAL mailing list > PHPTAL@lists.motion-twin.com > http://lists.motion-twin.com/mailman/listinfo/phptal
_______________________________________________ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal