Re: cvs: docweb /include docweb_language.class.php docweb_template.class.php init.inc.php

From: Date: Sun, 31 Oct 2004 05:00:21 +0000
Subject: Re: cvs: docweb /include docweb_language.class.php docweb_template.class.php init.inc.php
References: 1  Groups: php.doc.web 
Request: Send a blank email to doc-web+get-380@lists.php.net to get a copy of this message
Sean Coates wrote:
Log: added dynamic entity params
Mehdi identified a problem in the template/entity system, tonight on IRC: How to do parametered entities? He wanted to do something like: 'The $proj Manual' where $proj can be PHP, PHP-GTK, PEAR, etc. So, together we came up with two solutions. First, nested static docweb identities work, now, so it's possible to do: <!ENTITY docweb.test-text 'Here is some "TEST TEXT"'> <!ENTITY docweb.test-nested 'Here is a nested test: &docweb.test-text;'> So, the output of &docweb.test-nested; would be: 'Here is a nested test: Here is some "TEST TEXT"' Second, it's now possible to nest parameters within entities: <!ENTITY docweb.test-variable 'Variable text goes here: &param.vartext;'> Then, in the template you would do: <?php echo $Language->get('docweb.test-variable', array('vartext'=>'it works')); ?> To produce: 'Variable text goes here: it works' ... Should make entities much more usable. S

« previous php.doc.web (#380) next »