Re: [Zope] specifying a different default view than index_html
This may seem like overkill. Then again, it may seem overly simplistic. Here goes...
You can put a (big) <dtml-if> statement in your index_html. In the if statement, you can check to see if you user was looking for the "root" index_html. If so, render the unique text (i.e., the first portion of the if statement). Otherwise, render the "else" portion of the if statement.
I believe that you can determine what the specific URL is in the REQUEST parameter. You should be able to do an equivalency check on the root folder.
Hope that helps.
Duh. This is why pair-programming and active mailing lists like this are so valuable -- it's so easy in programming to get so stuck in the complexities of your problem that you can't step back far enough to see the simplicity of the situation. It takes an innocent bystander to whack you over the head and say "huh? why don't you just do this?". (I think the introduction to your response -- wondering at the same time whether the solution is overkill or overly simplistic -- might be a hallmark of such situations.) Thanks for the whack. Should work just fine.
Mitchell L Model wrote:
Is there a way to specify a different default for when a folder is viewed so that it doesn't use index_html?
Here's the situation: I have a hierarchy of folders. I want everything except the root to share a common index_html. The root is special -- the entry to my site. I don't want people to have to type anything other than the path to the root folder to enter the site (though if there's no other way to do it, it won't be a big deal if they have to add a specific .html file to the path). When they enter the site, they should get a different view than the default index_html. So, I need a way to either change the default used by the root or the default used by everything else.
I realize I can interpose another level of folder between the root and everything else, in order to store defaults I don't want shared by the root. I may do that if there are more defaults I don't want shared with the root, but right now index_html is the only one.
I'd be interested in design suggestions regarding this issue as well as hints for mechanisms to use.
_______________________________________________ Zope maillist - Zope@zope.org 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 )
participants (1)
-
Mitchell L Model