RE: [Zope] Including a method returning batches inside a page.
hi Dieter For a DTML method(!), "id" is the id of the object of which the method is used as a method. In your case, this is the folder. No, actually -- since 'index_html' is a document, it turns out to be the id of 'index_html'. In some cases, you would use "this().id". OK, I'll try and understand that .. -- jean ___ Zope maillist - [EMAIL PROTECTED] 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] Including a method returning batches inside a page.
Hi all In my 'index_html', I have:: dtml-var docsByTitle This is supposed to return batches of documents, similarly to http://www.zope.org/Products/ [1]. It works halfway, but the links to previous and next batches of course refer to 'docsByTitle' and not to 'index_html':: a href="dtml-var document_iddtml-var sequence-queryqs=dtml-var next-sequence-start-number" I could include the looping code in 'index_html' (like [1] does), but that isn't pretty -- and besides, I'd like to be able to choose between 'docsByTitle', 'docsByOrigin', 'docsBySeries', etc. Is the best way to do this to carry the relevant variable ('sequence-query', 'next-sequence-start-number' back and forth between 'index_html' and 'docsByTitle' in the REQUEST? How would you tackle this? -- Jean Jordaan --technical writer-- Mosaic Software--Zope 2.1.6 on WinNT and W2K ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Including a method returning batches inside a page.
Is docsByTitle a DTML Document? If so then try making it a DTML Method. It seems to be taking the properties from itself rather than it's container, if yu see what I mean. hth Phil [EMAIL PROTECTED] - Original Message - From: "Jean Jordaan" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 23, 2000 1:11 PM Subject: [Zope] Including a method returning batches inside a page. Hi all In my 'index_html', I have:: dtml-var docsByTitle This is supposed to return batches of documents, similarly to http://www.zope.org/Products/ [1]. It works halfway, but the links to previous and next batches of course refer to 'docsByTitle' and not to 'index_html':: a href="dtml-var document_iddtml-var sequence-queryqs=dtml-var next-sequence-start-number" I could include the looping code in 'index_html' (like [1] does), but that isn't pretty -- and besides, I'd like to be able to choose between 'docsByTitle', 'docsByOrigin', 'docsBySeries', etc. Is the best way to do this to carry the relevant variable ('sequence-query', 'next-sequence-start-number' back and forth between 'index_html' and 'docsByTitle' in the REQUEST? How would you tackle this? -- Jean Jordaan --technical writer-- Mosaic Software--Zope 2.1.6 on WinNT and W2K ___ Zope maillist - [EMAIL PROTECTED] 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 - [EMAIL PROTECTED] 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 )
RE: [Zope] Including a method returning batches inside a page.
Hi Phil Is docsByTitle a DTML Document? It's a Method alright -- cutting straight off the screen:: DTML Method at /docs / docsByTitle and 'index_html' is:: DTML Document at /docs / index_html a href="dtml-var document_iddtml-var sequence-queryqs=dtml-var next-sequence-start-number" Hmm, it sounds like you expected 'document_id' to refer to 'index_html' instead of to 'docsByTitle'. That sets me thinking. Hmm! It works exactly that way if you replace 'document_id' with 'id'! Does this break anything?:: a href="dtml-var iddtml-var sequence-queryqs=dtml-var next-sequence-start-number" Thanks! -- Jean Jordaan --technical writer-- Mosaic Software--Zope 2.1.6 on WinNT and W2K ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Including a method returning batches inside a page.
Jean Jordaan writes: In my 'index_html', I have:: dtml-var docsByTitle This is supposed to return batches of documents, similarly to http://www.zope.org/Products/ [1]. It works halfway, but the links to previous and next batches of course refer to 'docsByTitle' and not to 'index_html':: a href="dtml-var document_iddtml-var sequence-queryqs=dtml-var next-sequence-start-number" "document_id" is the id of the executing DTML objects. For a DTML method(!), "id" is the id of the object of which the method is used as a method. In your case, this is the folder. In some cases, you would use "this().id". This gives you the id of the "top level" DTML object. In your case, this would be "index_html". Dieter ___ Zope maillist - [EMAIL PROTECTED] 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 )