On Tue, 15 Dec 1998, Pavlos Christoforou wrote:
Please please God make Documents have properties ...
Yer outta luck. I don't know if this is standard operating procedure for Zope, but all my "pages" are Folders, and bulk of the contents are in index_html. That will let you use whatever properties you want, and it seems to make later expansion a bit easier. -- Andy Dustman You should always say "spam" and "eggs" ComStar Communications Corp. instead of "foo" and "bar" (706) 549-7689 | PGP KeyID=0xC72F3F1D in Python examples. (Mark Lutz)
On Tue, 15 Dec 1998, Andy Dustman wrote:
On Tue, 15 Dec 1998, Pavlos Christoforou wrote:
Please please God make Documents have properties ...
Yer outta luck. I don't know if this is standard operating procedure for Zope, but all my "pages" are Folders, and bulk of the contents are in index_html. That will let you use whatever properties you want, and it seems to make later expansion a bit easier.
But it won't solve my problem of constructing cute AUTOMATIC side margins. If Docs had properties I could set a property (lets say include_me_in_margin) and have a DTML construct recursively a nice side-margin. I haven't even found a simple way of figuring out if a PATH_INFO component is a Folderish object or not. Pavlos
Pavlos Christoforou wrote:
I haven't even found a simple way of figuring out if a PATH_INFO component is a Folderish object or not.
<!--#if "foo.isPrincipiaFolderish"--> -- Jim Fulton mailto:jim@digicool.com Technical Director (540) 371-6909 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
>> I haven't even found a simple way of figuring out if a PATH_INFO >> component is a Folderish object or not. Jim> <!--#if "foo.isPrincipiaFolderish"--> Pardon my ignorance, but what is "folderish"? In general, I think there is a getting to be a fair bit of unique nomenclature flying about on the list that is going to undermine attempts of newbies to understand what's what. Skip Montanaro | Mojam: "Uniting the World of Music" http://www.mojam.com/ skip@calendar.com | Musi-Cal: http://concerts.calendar.com/ 518-372-5583
On Tue, 15 Dec 1998 skip@calendar.com wrote:
>> I haven't even found a simple way of figuring out if a PATH_INFO >> component is a Folderish object or not.
Jim> <!--#if "foo.isPrincipiaFolderish"-->
Pardon my ignorance, but what is "folderish"? In general, I think there is a getting to be a fair bit of unique nomenclature flying about on the list that is going to undermine attempts of newbies to understand what's what.
A Folderish object (I am new to Zope too so I might be wrong) is a Zope object that can contain other Zope objects, properties etc in contrast to Documents which are methods of Folderish objects and cannot contain other objects. Documents do have attributes but you cannot add new attributes which is what I need at this point. You are right about the unique nomenclature though, and yesterday I spent 5-6 hours greping reading the sources and trying, to get my side-margin to work. It was very frustrating but Zope was not initially designed as an open source Software so I imagine the Digicools developed over time their unique ways and nomenclature. It would take a while before most of the tricks get exposed. I hope that the tips page on the Zope site grows fast. Pavlos
On Tue, 15 Dec 1998 skip@calendar.com wrote:
>> I haven't even found a simple way of figuring out if a PATH_INFO >> component is a Folderish object or not.
Jim> <!--#if "foo.isPrincipiaFolderish"-->
Pardon my ignorance, but what is "folderish"? In general, I
think there is
a getting to be a fair bit of unique nomenclature flying about on the list that is going to undermine attempts of newbies to understand what's what.
A Folderish object (I am new to Zope too so I might be wrong) is a Zope object that can contain other Zope objects, properties etc in contrast to Documents which are methods of Folderish objects and cannot contain other objects. Documents do have attributes but you cannot add new attributes which is what I need at this point.
The isPrincipiaFolderish attribute is used by the tree tag. The tag calls the tpValues method of an object to get its list of branches - it's this code that checks for isPrincipiaFolderish to see if a branch is folderish. tpValues is implemented in the standard Folder, as well as in add-on Products. Here's such a code snippet for tpValues, building a list of folderish branches r: for id in self._objects: o=getattr(self, id['id']) try: if o.isPrincipiaFolderish: r.append(o) except: pass The great thing about the tree tag is that you can give it another method to use rather than the default tpValues (and its use of isPrincipiaFolderish). The dtml guide gives an example of <!--#tree branches=objectValues--> for a tree that displays all sub-objects of a folder, not just those which are folderish. Custom Products can define other methods, which can check their own attributes (e.g. 'live' folders, etc.) of folderish-ness. Rhys
Andy Dustman wrote:
On Tue, 15 Dec 1998, Pavlos Christoforou wrote:
Please please God make Documents have properties ...
Yer outta luck.
No he isn't.
I don't know if this is standard operating procedure for Zope, but all my "pages" are Folders, and bulk of the contents are in index_html. That will let you use whatever properties you want, and it seems to make later expansion a bit easier.
This approach is especially useful if youwant to have complex content spread over multiple objects (images etc.). We plan to provide a mechanism called "Zope Classes" that will allow you to build custom complex objects with shared features like methods (DTML or otherwise), subobjects, etc. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (540) 371-6909 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Pavlos Christoforou wrote:
make Documents have properties ...
Current documents will be renamed to "DTML Method". There will a new kind of object called "DTML Document". The second kind of object will have properties and will display these properties before folder properties. This will happen RSN. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (540) 371-6909 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
participants (5)
-
Andy Dustman -
Jim Fulton -
Pavlos Christoforou -
Rhys Jones -
skip@calendar.com