-- Jurian Sluiman <[email protected]> wrote
(on Tuesday, 25 January 2011, 11:32 PM +0100):
> I'd like to set a meta tag with a description, but only when the tag isn't 
> set 
> yet. When it's set twice, the second description is rendered and not the 
> first 
> (and that's not what I want).
> 
> The only method I recognized is the following, which seems very bloated:
> 
> foreach ($helper->getContainer()->getValue() as $item) {
>     if ($item->type === 'name' && $item->name === 'description') {
>         // Yes, it's already set
>     }
> }
> 
> Is this true it's the only method? And if not, how am I able to check if the 
> description isn't set yet?

Yes, that's the only way to do so. It was never a use case we targetted.

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

Reply via email to