Re: [Zope] [Q] Generating a dynamic navigation bar...
Maik Roeder proclaimed: > Sudhakar Chandra wrote: > > Questions: > > 1. The problem with this DTML method is that all the DTML Documents and > > Folders are represented as a link in the nav bar. I want to build > > intelligence into this DTML method to make the tab / cell for the current > > document just textual (as opposed to a link). If I am calling this method > > from foo_html, I do not the "tab" for foo_html to be a link. How do I do > > this? I'm guessing some kind of #if. > > First you can store the your url: > > > > Then, when you call your method, you can test whether your > url is the current url > > > > The must be another way of doing this, but I can't remember. Does > someone else see how this could be done differently ? Thanks. It took a bit of hackage on my part because I was calling the subcategories DTML Method like so: As you can see, I'm in a different name space inside the DTML method. I put in the REQUEST.set in the main DTML Document instead of the DTML method and it worked like a charm. Only pain now is that all my DTML Documents now need to have the REQEST.set directive in them. Not a big deal. > > 2. Currently, the TD cells of the table vary in length based on the > > contents of the cell. I want all the TDs to be of equal length. I want to > > first count the number of DTML Documents and Folders and make each TD to be > > width 100/n % (where n is the number of Documents and Folders). Any ideas > > on how I can do math inside DTML methods? > You can set a REQUEST variable with the result of your computation: > Document','Folder'])))"> This worked like a charm. Thanks! S. -- Lisa: It's full, Dad, that means you have to take out the trash. Bart: Yup, that's the rule. "He who tops it off, drops it off." Homer: Nuh-uh. "It isn't filled until it's spilled." Sudhakar C13nhttp://www.aunet.org/thaths/Lead Indentured Slave ___ 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] [Q] Generating a dynamic navigation bar...
Hi Sudhakar ! Sudhakar Chandra wrote: > Questions: > > 1. The problem with this DTML method is that all the DTML Documents and > Folders are represented as a link in the nav bar. I want to build > intelligence into this DTML method to make the tab / cell for the current > document just textual (as opposed to a link). If I am calling this method > from foo_html, I do not the "tab" for foo_html to be a link. How do I do > this? I'm guessing some kind of #if. First you can store the your url: Then, when you call your method, you can test whether your url is the current url The must be another way of doing this, but I can't remember. Does someone else see how this could be done differently ? > 2. Currently, the TD cells of the table vary in length based on the > contents of the cell. I want all the TDs to be of equal length. I want to > first count the number of DTML Documents and Folders and make each TD to be > width 100/n % (where n is the number of Documents and Folders). Any ideas > on how I can do math inside DTML methods? You can set a REQUEST variable with the result of your computation: Regards, Maik Röder -- Uzopia - Digging la vida Zopa - http://uzopia.editthispage.com ___ 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] [Q] Generating a dynamic navigation bar...
Background: I have a folder with various DTML Documents and sub-folders in it. Sort of like: /foo/index_html /foo/buy_html /foo/really_buy_html /foo/really_really_buy_html /foo/bar/ I am in the process of writing a DTML method to be used from each of these DTML documents which will generate a dynamic tabbed navigation bar for the other DTML Documents AND sub-folders in this folder. I am envisioning a short table across the width of the page with cells containing links to the other DTML documents and sub-folders. This is what I have so far: "> Questions: 1. The problem with this DTML method is that all the DTML Documents and Folders are represented as a link in the nav bar. I want to build intelligence into this DTML method to make the tab / cell for the current document just textual (as opposed to a link). If I am calling this method from foo_html, I do not the "tab" for foo_html to be a link. How do I do this? I'm guessing some kind of #if. 2. Currently, the TD cells of the table vary in length based on the contents of the cell. I want all the TDs to be of equal length. I want to first count the number of DTML Documents and Folders and make each TD to be width 100/n % (where n is the number of Documents and Folders). Any ideas on how I can do math inside DTML methods? Thanks. Thaths -- Lisa: It's full, Dad, that means you have to take out the trash. Bart: Yup, that's the rule. "He who tops it off, drops it off." Homer: Nuh-uh. "It isn't filled until it's spilled." Sudhakar C13nhttp://www.aunet.org/thaths/Lead Indentured Slave ___ 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 )