RE: [PHPTAL] tal:condition and element contents
Sorry ignore that, was me being retarded! It works if you use tal:omit-tag="not: isAdmin" Thanks again -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Standbrook Sent: 29 February 2008 10:34 To: Template Attribute Language for PHP Subject: Re: [PHPTAL] tal:condition and element contents Try this, I assume omit takes an argument. The Title Richard Standbrook --- Senior Web Services Developer [EMAIL PROTECTED] Registration no: 03160139 Litton House, Saville Road, Westwood, Peterborough, England, PE3 7PR NOTICE: The information contained in this email and any attachments is confidential and may be privileged. If you are not the intended recipient you should not use, disclose, distribute or copy any of the content of it or of any attachment; you are requested to notify the sender immediately of your receipt of the email and then to delete it and any attachments from your system. On 29 Feb 2008, at 10:21, Nick Pack wrote: > For my current project, I have the need to display a form tag > around some elements if a condition is met, but maintaining the > contents of the element regardless of the condition. For example: > > > The Title > > > > Is there a way that I can specify a parameter so that the elements > inside the form can still be shown but omit the form tag, so that if > condition isAdmin is not met, the above output will display as: > > The Title > > > Thanks in advance. > ___ > 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 ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
Re: [PHPTAL] tal:condition and element contents
On Fri, Feb 29, 2008 at 10:37:17AM -, Nick Pack wrote: > Thanks for your response Richard, doesn't look like it does accept an > arguement, > > I tried the below and it resulted in an exception, with the message: > > 'PHPTAL_Dom_Parser error: Unexpected 'â' character, expecting > attribute single or double quote dont copy-n-paste his quote; write it properly. he put some fancy msword quotes around it (or his MUA did it for him). afaik omit-tag does _not_ allow a check - at least it does not in ZPT. use a macro instead: -- cu pgpoPuHEulyCs.pgp Description: PGP signature ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
RE: [PHPTAL] tal:condition and element contents
Thanks for your response Richard, doesn't look like it does accept an arguement, I tried the below and it resulted in an exception, with the message: 'PHPTAL_Dom_Parser error: Unexpected 'â' character, expecting attribute single or double quote -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Standbrook Sent: 29 February 2008 10:34 To: Template Attribute Language for PHP Subject: Re: [PHPTAL] tal:condition and element contents Try this, I assume omit takes an argument. The Title Richard Standbrook --- Senior Web Services Developer [EMAIL PROTECTED] Registration no: 03160139 Litton House, Saville Road, Westwood, Peterborough, England, PE3 7PR NOTICE: The information contained in this email and any attachments is confidential and may be privileged. If you are not the intended recipient you should not use, disclose, distribute or copy any of the content of it or of any attachment; you are requested to notify the sender immediately of your receipt of the email and then to delete it and any attachments from your system. On 29 Feb 2008, at 10:21, Nick Pack wrote: > For my current project, I have the need to display a form tag > around some elements if a condition is met, but maintaining the > contents of the element regardless of the condition. For example: > > > The Title > > > > Is there a way that I can specify a parameter so that the elements > inside the form can still be shown but omit the form tag, so that if > condition isAdmin is not met, the above output will display as: > > The Title > > > Thanks in advance. > ___ > 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 ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
Re: [PHPTAL] tal:condition and element contents
Try this, I assume omit takes an argument. The Title Richard Standbrook --- Senior Web Services Developer [EMAIL PROTECTED] Registration no: 03160139 Litton House, Saville Road, Westwood, Peterborough, England, PE3 7PR NOTICE: The information contained in this email and any attachments is confidential and may be privileged. If you are not the intended recipient you should not use, disclose, distribute or copy any of the content of it or of any attachment; you are requested to notify the sender immediately of your receipt of the email and then to delete it and any attachments from your system. On 29 Feb 2008, at 10:21, Nick Pack wrote: For my current project, I have the need to display a form tag around some elements if a condition is met, but maintaining the contents of the element regardless of the condition. For example: The Title Is there a way that I can specify a parameter so that the elements inside the form can still be shown but omit the form tag, so that if condition isAdmin is not met, the above output will display as: The Title Thanks in advance. ___ 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