Re: [PHPTAL] Variable interpolation inside structure'd expression

2013-05-30 Thread Robert Goldsmith
Hello :) I'm not sure I understand your problem but for the href you should prob. do something like: a tal:attributes=href string:${appURL}/the-rest-of-the-pathsome text/a Robert - Robert Goldsmith rgoldsm...@names.co.uk On 30 May 2013, at 05:21, romtek rom...@gmail.com wrote: Hi

Re: [PHPTAL] How to add customized namespace-attribute out of the Phptal repository

2012-09-25 Thread Robert Goldsmith
things simple and require the class manually as long as you do so before the point you call 'PHPTAL_Dom_Defs::getInstance()-registerNamespace(new MyNewNS());' Robert - Robert Goldsmith rgoldsm...@names.co.uk I've added my own namespace using: PHPTAL_Dom_Defs::getInstance()-registerNamespace

[PHPTAL] Template name hashes

2012-08-15 Thread Robert Goldsmith
the templates (put them in a phar and drop them on a different server) this isn't going to work. Has anyone attempted to change the way the template name hashes are calculated before and can they give me some pointers as to the way to go about doing it? Robert - Robert Goldsmith rgoldsm

Re: [PHPTAL] Template name hashes

2012-08-15 Thread Robert Goldsmith
enhancement that an additional method be added to the Source interface that compliments 'getRealPath()' specifically for use in generating the hash so the Source classes can be subclassed instead of the PHPTAL class? Robert - Robert Goldsmith rgoldsm...@names.co.uk On 15 Aug 2012, at 15:41

Re: [PHPTAL] Template name hashes

2012-08-15 Thread Robert Goldsmith
environment so that the only php allowed to execute is within a signed Phar in order to add a strong new layer to our site security. Robert - Robert Goldsmith rgoldsm...@names.co.uk On 15 Aug 2012, at 17:11, Kornel Lesi??ski kor...@geekhood.net wrote: I don't understand why do you need

[PHPTAL] PHP content in templates

2012-05-18 Thread Robert Goldsmith
Hello :) We've noticed you can just drop ?php php-code ? in a tal template and it will drop it in the compiled template file and execute it. This is not something we want to happen so any suggestions on the best way to prevent it? Robert Robert Goldsmith rgoldsm...@names.co.uk

Re: [PHPTAL] PHP content in templates

2012-05-18 Thread Robert Goldsmith
the point in the php: functionality if you can just embed php? Robert Robert Goldsmith rgoldsm...@names.co.uk On 18 May 2012, at 14:10, ajcri...@gmail.com wrote: Don't do it? You can create a pre-filter that strips those from the source --Original Message-- From: Robert

Re: [PHPTAL] Variables in i18n:attributes

2012-05-16 Thread Robert Goldsmith
but I haven't seen why that wouldn't be the case. Robert Robert Goldsmith rgoldsm...@names.co.uk On 16 May 2012, at 12:46, Thomas Tanghus wrote: On Saturday 12 May 2012 11:53 Thomas Tanghus wrote: Hi I started playing around with phptal this week because I wanted to see

[PHPTAL] Custom namespaces

2012-04-16 Thread Robert Goldsmith
in the constructor which is called the first time PHPTAL_Dom_Defs is used. I guess I'd need to find a sensible point guaranteed to be before the first use of this class and call it myself to register the new namespace. Robert Robert Goldsmith rgoldsm...@names.co.uk

Re: [PHPTAL] ZTal 1.3.0

2012-03-28 Thread Robert Goldsmith
benefits that would initially make upgrading worthwhile. I suspect we will pick it up for a couple of smaller projects first and evaluate it. Robert Robert Goldsmith rgoldsm...@names.co.uk On 27 Mar 2012, at 19:58, Marco Pivetta wrote: Hey Robert! Cool stuff, but I already moved

[PHPTAL] ZTal 1.3.0

2012-03-27 Thread Robert Goldsmith
for loading templates from within a Phar Regarding the last item, we've used a Resolver class which anyone can make use of within a standard PHPTAL setup and there is nothing particularly ZTal about it :) Robert Robert Goldsmith rgoldsm...@names.co.uk

Re: [PHPTAL] Translation sometimes works sometimes don't

2011-11-02 Thread Robert Goldsmith
Do you have any sort of page output caching? Robert Robert Goldsmith rgoldsm...@names.co.uk On 2 Nov 2011, at 12:30, Ježísheck wrote: Hi fellow PHPTALers! I'm experiencing strange thing with translations. I have a simple template index.pt: metal:page metal:use-macro

Re: [PHPTAL] Minimized version of modifiers

2011-07-15 Thread Robert Goldsmith
name. Robert Goldsmith On 14 Jul 2011, at 23:05, Darrell Hamilton wrote: I would argue that compile time type inferencing in Scala is not comparable to shortening an attribute name. The intent of the feature in Scala is not to lessen the number of characters typed, but to eliminate the need

Re: [PHPTAL] Minimized version of modifiers

2011-07-15 Thread Robert Goldsmith
Does anyone know if Sean is out of the office? ;) On 15 Jul 2011, at 09:28, s...@canterris.com wrote: Thank you for contacting Canterris. I???m currently out of the office until July 25. Please feel free to contact Will Freemen (w...@canterris.com) or Canterris Technical Support

Re: [PHPTAL] Table with two array problem

2011-06-28 Thread Robert Goldsmith
I think I understand what you are saying. The easiest way to do this would be if 'idoffer' is the key for the second array (so you have an array of key/value pairs with the idoffer as the key and name as the value). Then you can effectively ask 'give me the value for this key I am giving you

Re: [PHPTAL] PHPTAL and ZTal

2011-04-14 Thread Robert Goldsmith
I am pretty new PHPTAL, and Zend Framework, but was happy to run accross ZTal. How do you get ZTal to use hyphenated view names (e.g. product-description.xhtml) instead of the CamelCasing it currently does? Ztal doesn't use hyphenated view names. Honestly, I really don't understand why

Re: [PHPTAL] tal:equal ?!

2011-04-13 Thread Robert Goldsmith
Hello :) It wouldn't work quite as you suggest because of how you use tales but we have an 'equal' tale as part of Ztal that does pretty much the same thing. You use it as follows: div tal:condition=Ztal_Tales_Generic.equal:listing.status,string:ACTIVE print some good content here/div The |

Re: [PHPTAL] Ztal 1.0.0

2011-01-05 Thread Robert Goldsmith
2010/12/22 Robert Goldsmith rgoldsm...@names.co.uk Hello :) Sorry for not replying to everyone's comments but I'm on holiday for christmas :) Regarding Marco's comment on Zend_Application_Resource_Interface I would guess it is a question of how Ztal is loaded into a Zend

Re: [PHPTAL] Ztal 1.0.0

2011-01-05 Thread Robert Goldsmith
It should be UTF-8 but without the BOM headers. If the files are not UTF-8 I'll look into converting them but we develop UTF-8, unix line endings by default :) Robert On 5 Jan 2011, at 10:23, aaatoja wrote: BTW. Could You set UTF-8 as default encoding in your project? Looking throug the

Re: [PHPTAL] Ztal 1.0.0

2010-12-21 Thread Robert Goldsmith
(in Italian and English) across our company intranet. Our next step is upgrading some of our customer facing services where, as we roll out the upgrades, we expect hundreds of thousands and then millions of daily page hits. Robert Goldsmith On Sun, 19 Dec 2010 13:31:44 +0100, Marco Pivetta

[PHPTAL] Ztal 1.0.0

2010-12-17 Thread Robert Goldsmith
and, of course, comments welcome :) Robert Goldsmith ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal

[PHPTAL] runtime generated slot names

2010-11-08 Thread Robert Goldsmith
Hi all, I'd like to create a macro with fillable slots but I'd like the names of these slots to be based on variable information passed to the macro. It appears at the moment that the content of a 'define-slot=' is not processed like other content and is simply treated as a string. I'd prefer

Re: [PHPTAL] PHPTAL and form macros

2010-08-03 Thread Robert Goldsmith
Hi all, Well, we here at Namesco are working hard to get a release package together for the Zend/PHPTal integration 'glue' we've developed for our own internal codebase (which we've called ZTal) and this has full integration with Zend_Form. As such it includes a large number of macros for

Re: [PHPTAL] PHPTAL and form macros

2010-08-03 Thread Robert Goldsmith
complex one-off forms within the system using specific templates, but to have a generalised forms to hand for most of the rest... without having to change the backend logic. Hope that's as clear as mud... On 3 Aug 2010, at 08:39, Robert Goldsmith wrote: Hi all, Well, we here at Namesco

Re: [PHPTAL] require_once vs autoloading

2010-06-02 Thread Robert Goldsmith
autoloader. Robert On 2 Jun 2010, at 10:25, Kornel Lesiński wrote: On 02-06-2010 at 09:56:23 Robert Goldsmith rgoldsm...@names.co.uk wrote: I think autoloading is a good idea but please keep in mind that the app the phptal is being used within may already have autoloading configured. a prime

Re: [PHPTAL] require_once vs autoloading

2010-06-02 Thread Robert Goldsmith
call it something more specific to phptal. Robert On 2 Jun 2010, at 11:29, Kornel Lesiński wrote: On 02-06-2010 at 11:10:43 Robert Goldsmith rgoldsm...@names.co.uk wrote: Why would someone choose to replace PHPTAL's autoload with something else? (I'm not implying it's perfect or such, just

Re: [PHPTAL] require_once vs autoloading

2010-06-02 Thread Robert Goldsmith
require_once PHPTAL.php; spl_autoload_unregister(array('PHPTAL','autoload')); // if needed: spl_autoload_register('__autoload'); Would that be OK? Wouldn't that cause issues when PHPTAL needs to load more classes during the course of the script's execution? I think the idea is that this

[PHPTAL] metal slots and repeats in metal macros

2010-05-05 Thread Robert Goldsmith
Hi all, Just a quick one. Could someone tell me how to reference a variable defined within a metal macro from within a slot? In particular, I'd like to define a macro that generates a calendar grid of days and then use a slot to provide varying content to be rendered within the 'day' cells. I

Re: [PHPTAL] Re: Changing PHPTAL i18n compilation

2010-04-12 Thread Robert Goldsmith
Gettext translation being already loaded in memory, I suppose there's not much difference calling gettext method rather than fetching variables from memcache or other shared memory system. I'm not sure why you would assume the gettext translation would already be in memory - the mo file will

Re: [PHPTAL] custom nodes

2010-04-09 Thread Robert Goldsmith
Hello :) I don't know if someone has replied to you directly but this is what Tal Expression Modifiers are for: http://phptal.org/manual/en/split/custom-modifiers.html Understanding and writing them can be a little tricky as the documentation is not extensive but the key points to remember

Re: [PHPTAL] Changing PHPTAL i18n compilation

2010-04-09 Thread Robert Goldsmith
As part of my integration into Zend Framework, I wrote a replacement translator service for phptal. you basically just write a class that implements PHPTAL_TranslationService and then when you create the phptal instance you call its 'setTranslator' method and pass in an instance of your class.