[Zope] How do I get the first ten characters of a string?
Loren Stafford
lstafford@morphics.com
Fri, 23 Feb 2001 09:52:53 -0800
The date is a complex object not a string. Zope provides many ways to format
it. Here is one:
<dtml-var "ZopeTime()" fmt=%Y/%m/%d>
-- Loren
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On
> Behalf Of Lars
> Heber
> Sent: Friday, February 23, 2001 09:37
> To: zope@zope.org
> Subject: Re: [Zope] How do I get the first ten characters of a string?
>
>
> Chris Withers schrieb:
>
> > Lars Heber wrote:
> > >
> > > <dtml-let myTest="'some really senseless blah'">
> > > <dtml-var *first 10 characters of myTest*>
> > > </dtml-let>
> >
> > <dtml-var "myTest[:10]">
> >
> > cheers,
> >
> > Chris
>
> I tested it out - didn't work.
>
> I wanted to do that with a date:
>
> <dtml-let datum="ZopeTime()+7">
> <dtml-var "datum[:10]">
> </dtml-let>
>
> "Date is unsliceable"... ??? What I want to get is just the date
> without the time!
>
> Any ideas?
>
> Some more questions:
>
> - I'd like to give my each instance of my ZClass a title,
> which is then
> shown in the folder window, just like documents for example.
> I tried to simply create a property "title" in my property
> sheet, but as
>
> expected, it of course didn't refer to that property to show it in the
> overview.
>
> - How can I get the source code of manage_main? I'd like to
> modify it a
> little within my ZClass.
>
> Thanks to you all!!!
>
> Lars
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>