Re: [Zope] Getting a date into an object title - DISREGARD
Why is it that within 5 minutes after posting a notice on this list that I figure out a solution to the problem? Is there something therapeutic/magical about this list? Ron
I want to put a date value into a DTML Document title so that when the DTML Documents are sorted by their title, they will automatically be sorted by date. (Incidentally, the title also has some other non-date information.)
I've tried various schemes and they don't work. I'm using the Zope book template for creating the DTML Documents (which are loaded by the users who don't have manage access). This means that I have a form to gether information (including the contact date, which is transmitted from the form as "contact_date"). The form calls an DTML method that calls a Python script which creates the DTML Document.
Any hints, either in DTML or for the Python script, would be most appreciated.
Thanks,
Ron
_______________________________________________ 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 )
Is there something therapeutic/magical about this list?
Of course, you didnt know ;) BTW I normally set the id equal to the time in secs... which gives a horrible url but has *loads* of other advantages. -- Andy McKay. ----- Original Message ----- From: <complaw@hal-pc.org> To: <complaw@hal-pc.org>; <zope@zope.org> Sent: Friday, March 30, 2001 9:54 AM Subject: Re: [Zope] Getting a date into an object title - DISREGARD
Why is it that within 5 minutes after posting a notice on this list that I figure out a solution to the problem?
Is there something therapeutic/magical about this list?
Ron
I want to put a date value into a DTML Document title so that when the DTML Documents are sorted by their title, they will automatically be sorted by date. (Incidentally, the title also has some other non-date information.)
I've tried various schemes and they don't work. I'm using the Zope book template for creating the DTML Documents (which are loaded by the users who don't have manage access). This means that I have a form to gether information (including the contact date, which is transmitted from the form as "contact_date"). The form calls an DTML method that calls a Python script which creates the DTML Document.
Any hints, either in DTML or for the Python script, would be most appreciated.
Thanks,
Ron
_______________________________________________ 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 )
_______________________________________________ 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 )
BTW I normally set the id equal to the time in secs... which gives a horrible url but has *loads* of other advantages.
you can also use the iso time standard (yyyymmdd) ex. 20010330 for today if you have 1 news a day for example. but unix time is cool too... (the good thing with iso time is that you can access it fairly easily (from javascript for example), it's human readable (time is too, but you have to be *very* in math)) $ven
Thats true too... the only problem as you said with that is its an id so has to be unique and that limits you. But yes it is a lot more readable and flexible. -- Andy McKay. ----- Original Message ----- From: "Junk" <junk@gargl.net> To: "Andy McKay" <andym@ActiveState.com>; <zope@zope.org> Sent: Friday, March 30, 2001 10:18 AM Subject: RE: [Zope] Getting a date into an object title - DISREGARD
BTW I normally set the id equal to the time in secs... which gives a horrible url but has *loads* of other advantages.
you can also use the iso time standard (yyyymmdd) ex. 20010330 for today if you have 1 news a day for example. but unix time is cool too... (the good thing with iso time is that you can access it fairly easily (from javascript for example), it's human readable (time is too, but you have to be *very* in math))
$ven
Hi Ron, its a common issue: if you are able to fully describe your problem you are only a single step away from solving. This is even true for teaching: if you teach someone on something you will get a deep understanding of the matter. (See Douglas Adams "Dirk Gentry - Holistic Detective Agency" ) :-)) Regards Tino complaw@hal-pc.org wrote:
Why is it that within 5 minutes after posting a notice on this list that I figure out a solution to the problem?
Is there something therapeutic/magical about this list?
Ron
I want to put a date value into a DTML Document title so that when the DTML Documents are sorted by their title, they will automatically be sorted by date. (Incidentally, the title also has some other non-date information.)
I've tried various schemes and they don't work. I'm using the Zope book template for creating the DTML Documents (which are loaded by the users who don't have manage access). This means that I have a form to gether information (including the contact date, which is transmitted from the form as "contact_date"). The form calls an DTML method that calls a Python script which creates the DTML Document.
Any hints, either in DTML or for the Python script, would be most appreciated.
Thanks,
Ron
_______________________________________________ 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 )
_______________________________________________ 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 )
participants (4)
-
Andy McKay -
complaw@hal-pc.org -
Junk -
Tino Wildenhain