ZPT Equivalent of <dtml-var title_or_id>
I thought this would be easy but apparently it's not. The sample ZPT sheet in the 2.6 distro has this line of code: <title tal:content="template/title">The Title</title> Unfortunately, that doesn't render a thing! So, why is it there?? Someone suggested this: <title tal:content="here/title">The Title</title> which sounded like a good idea, but no cigar. What I want is the ZPT equivalent of this: <dtml-var title_or_id> Does it exist?? TIA, beno
beno schrieb:
What I want is the ZPT equivalent of this:
<dtml-var title_or_id>
Does it exist??
As the Zope API docs tell me, title_or_id isn't a DTML function but a method of the class ObjectManagerItem, which means it can be called on every (?) item in a folder. So, try ..."here/title_or_id"... and make sure your document is a ZPT... HTH Martin
At 07:31 PM 1/5/2003 +0100, you wrote:
beno schrieb:
What I want is the ZPT equivalent of this:
<dtml-var title_or_id>
Does it exist??
As the Zope API docs tell me, title_or_id isn't a DTML function but a method of the class ObjectManagerItem, which means it can be called on every (?) item in a folder.
Good insight. Thanks.
So, try
..."here/title_or_id"...
Closer. This returned the title_or_id of the *container* (folder), not the document.
and make sure your document is a ZPT...
yep. Any more ideas? TIA, beno
beno schrieb:
..."here/title_or_id"...
Closer. This returned the title_or_id of the *container* (folder), not the document.
and make sure your document is a ZPT...
yep. Any more ideas?
Jo. ZopeBook, Appendix C, TALES Overview - Built-in Names. I guess "template/..." would have been correct... Sorry for only guessing, I'm about learning ZPTs myself and can't give it a try this evening. You don't have to know everything, you have to know where it's written... ;-) Martin
At 09:06 PM 1/5/2003 +0100, you wrote:
beno schrieb:
..."here/title_or_id"...
Closer. This returned the title_or_id of the *container* (folder), not the document.
and make sure your document is a ZPT...
yep. Any more ideas?
Jo. ZopeBook, Appendix C, TALES Overview - Built-in Names. I guess "template/..." would have been correct... Sorry for only guessing, I'm about learning ZPTs myself and can't give it a try this evening. You don't have to know everything, you have to know where it's written... ;-)
It's not just a matter of knowing where to look. You have to know what you're looking for. I've been working at learning programming now for 3+ years, and much of that here with Zope. I *am* getting better, but good grief! It's a struggle. BTW, you were right. Thanks! beno
beno schrieb:
It's not just a matter of knowing where to look. You have to know what you're looking for. I've been working at learning programming now for 3+ years, and much of that here with Zope. I *am* getting better, but good grief! It's a struggle.
Hmmm. <philosophy>Even if I'm probably going to get picked on now, I'd say that you should already be known to programming when starting to zope. It would surely make things easier if you learn to program with Python (or anything else, if you dare, preferably OO) (mustn't be in guru state, but you should know what it's about) and then learn to use Zope. Ah yes, and learning to look up docs and ressources should come *before* or at least *with* programming...</philosophy> JMHO (Just My Humble Opinion).
BTW, you were right. Thanks!
Ha! Am I good or what ;-)) Have a nice evening! I already do *g* Martin
At 11:26 PM 1/5/2003 +0100, you wrote:
beno schrieb:
It's not just a matter of knowing where to look. You have to know what you're looking for. I've been working at learning programming now for 3+ years, and much of that here with Zope. I *am* getting better, but good grief! It's a struggle.
Hmmm. <philosophy>Even if I'm probably going to get picked on now, I'd say that you should already be known to programming when starting to zope. It would surely make things easier if you learn to program with Python (or anything else, if you dare, preferably OO) (mustn't be in guru state, but you should know what it's about) and then learn to use Zope. Ah yes, and learning to look up docs and ressources should come *before* or at least *with* programming...</philosophy> JMHO (Just My Humble Opinion).
I am SO GLAD I found Zope...even as a newbie. And yes, I've been studying OOP/AOP/Python/UML/XML/XSLT/Linux... Oh, and occasionally I even get some sleep ;) beno
participants (2)
-
beno -
Martin Gebert