- How do I NOT acquire an object from a parent?
Well, I'm working on my web site for "New York State Aviation", and it's starting off fairly well.. I wanted to model the layout similar to www.Zope.org I'm using TinyTable to create my folder specific sidebar (it's great) But, I'd like subfolders to be able to add their own "middle sidebar" if a property is defined in that folder, (and not two folders above). How can I check to see if a given property exists in the current folder, and isn't being acquired from above? How can I use style sheets with zope? I see zope.org has a style sheet. Do I just upload the .css file as a file object in the parent and refer to it in the standard_html_header? It'd be nice if a "Document" could be structuredText. I was thinking of adding a "fmt" property to a document and setting it to "StructuredText" but I don't think that'd work. To use structuredText, I have to have two file objects defined. Any suggestions to work around this? Paul also said in www.egroups.com/list/zope/922.html, that Amos was working on documenting "mailto, relative URLs, footnotes".. I've looked through StructuredText.py and can't figure out urls or mailto's in the .py I have. Is that because it's not supported, or not documented? -- Now I just need to add 44 folder objects, one for each airport in new york.. sigh Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com ICQ: 14856937 We must come down from our heights, and leave our straight paths, for the byways and low places of life, if we would learn truths by strong contrasts; and in hovels, in forecastles, and among our own outcasts in foreign lands, see what has been wrought upon our fellow-creatures by accident, hardship, or vice. - Richard Henry Dana, Jr. 1836
Brad Clements wrote:
Well, I'm working on my web site for "New York State Aviation", and it's starting off fairly well.. I wanted to model the layout similar to www.Zope.org
I'm using TinyTable to create my folder specific sidebar (it's great)
But, I'd like subfolders to be able to add their own "middle sidebar" if a property is defined in that folder, (and not two folders above). How can I check to see if a given property exists in the current folder, and isn't being acquired from above?
Interesting question. You can get the current folder in a form that does *not* acquire by accessing the Acquisition-defined special attribute, aq_base. For simple properties, it should be sufficient to test: <!--#if "_.hasattr(aq_base, 'propname')"--> if you need to test for an object with security settings things would be bit more complicated, since most objects acquire permissions.
How can I use style sheets with zope? I see zope.org has a style sheet. Do I just upload the .css file as a file object in the parent and refer to it in the standard_html_header?
Yes.
It'd be nice if a "Document" could be structuredText. I was thinking of adding a "fmt" property to a document and setting it to "StructuredText" but I don't think that'd work.
I assume that you'd also rig the compilation machinery to call the structures text converter. This should work. This could most easily be done by overriding the cook method. We plan to support something like this in 1.10. I was thinking of either: - DTML Documents and - StructuredText Documents (that can use DTML) or - A single DTML document that has an option to process it's inoput through structured text when it is compiled. Probably the second option is the way to go. Opinions?
To use structuredText, I have to have two file objects defined.
Actually, a file and a Document.
Any suggestions to work around this?
Paul also said in www.egroups.com/list/zope/922.html, that Amos was working on documenting "mailto, relative URLs, footnotes".. I've looked through StructuredText.py and can't figure out urls or mailto's in the .py I have. Is that because it's not supported, or not documented?
It's because it was tacked as an afterthought: - mailto: "bla blah":mailto:address. note that the address *must* be followed by a period or comma. - relative URL: "bla blah":foo.html. note that the URL *must* be followed by a period or comma. - "footnotes" are really "references" borrowed from a system called "stext": blah blah [ref] bla blah .... bla blah .. [ref] the definition/reference The actual "definition" line must *begin* with ".. [ref]". The reference name, ref, may contain letters, digits, underscores and dashes. See the ExtensionClass documentation (in lib/Components/ExtensionClass/ExtensionClass.stx in a Zope source distribution) for examples of this.
Now I just need to add 44 folder objects, one for each airport in new york.. sigh
You should be able to automate this with a DTML script pretty easily. 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.
At 01:01 PM 1/15/99 +0000, Jim Fulton wrote:
We plan to support something like this in 1.10.
I was thinking of either:
- DTML Documents and - StructuredText Documents (that can use DTML)
or
- A single DTML document that has an option to process it's inoput through structured text when it is compiled.
Probably the second option is the way to go.
Opinions?
I would like the option *not* to use DTML. For example, I often find myself writing StructuredText Documents which use DTML examples, but do not want to actually use any DTML. It can be difficult to easily escape DTML in StructuredText. Also, I think for those who don't want it, it would be nice to be able to turn it off. After all--I believe that DTML is cool, but not necessarily central to the idea of an object that is meant to hold content. (Not, this is not the case for templating, as opposed to content-holding objects.) Also, if we decide to go for a generic Document object with an option for post-processing, I would advocate that there be a way to plug different processors easily into it. For example, I might want my Document to hold XML and process it with XSL (inspiration from Gabe Wachob). In fact, if we head down this road I can see lots of interesting things, like processors that do text filtering (like a frontier 'glossary' for example). We might also want processors to be actual Zope objects, so that moving them around in the object hierarchy changes how sub-Documents are processed. We might want Documents to have mime types, and processors to be registered to handle given mime-types... I think Zope's content management facilities could be beefed up, and the introduction of a new Document object is a good time to think about it. Not that I'm volunteering to write all this ;-) -Amos
participants (3)
-
Amos Latteier -
Brad Clements -
Jim Fulton