[Petal] Auto omit-tag

Warren Smith wsmith at hbslabs.com
Fri Oct 14 20:20:30 BST 2005


*sigh*

My High School English Teacher would kill me for that grammar.

s/principal/principle/;

-Warren

Warren Smith wrote:

>
> Petal only understands attributes and not tags (I think). There are a 
> couple of options to save typing:
>
> 1. Put this as part of your root tag:
>
> <html xmlns:tal="http://purl.org/petal/1.0/">
> Then you can type tal: instead of petal:
>
> 2. use <tag tal:replace="path/to/var"></tag> this will replace the 
> entire tag with the value of path/to/var
>
> 3. Technically <tag tal:omit-tag=""></tag> will eliminate the tag. 
> It's not in the spec, but saves typing.
> 4. Use the shorthand ${path/to/var}. It violates some of the 
> principals of Petal, but is rather handy.
>
> Hope this helps,
>
> Warren
>
> Josh Narins wrote:
>
>> I tend to use the same tag, over and over, to identify to me that I am
>> going to omit the tag (petal:omit-tag="string:1"). I generally use
>> tables and not divs, so if I see <div>, I know there is an omit-tag at
>> the end.
>>
>> Any chance there could be a feature that automatically omitted a
>> specified tag? <omit petal:condition="">, for example.
>>
>> I use them for control structures, like repeats and conditions.
>>
>> Not a huge deal, but it might be nice.
>>
>> -Josh
>>  
>>
>



More information about the Petal mailing list