[Grok-dev] View URLs?

Kenneth Miller xkenneth at gmail.com
Wed Jun 25 01:57:50 EDT 2008


All,

      So I've got a single app with an exra Grok.Container and  
Grok.Model. I've defined ONE index view that inherits from  
zope.Interface so that it's available to essentially any Model/ 
Container and the app. The way this is setup allows me to use the  
index template to provide a consistent look and feel to my app, and  
particularly navigation. The problem I'm currently having is that my  
template uses view.url('this') methods to access other views, which  
works fine, but only when you're viewing the base app. For example

The format for below is as follows:

Container/View
    Link  -> Generated result.

App/index
    MyPage1 -> app/mypage1
App/Container/index
    MyPage1 -> app/container/mypage1        when this should be  
pointing to app/mypage1

How should I handle this? There's no url methods attached to the App  
object.

Should I rearrange the way I handle index's/templates?

You can view my latest source code here:

http://github.com/xkenneth/buildoutbuilder/tree/7b541f2ab61696e18806b94e2f562c57b5ff5cb1/buildoutbuilder.grokapp/src/buildoutbuilder/grokapp

Thanks for your time!

Regards,
Kenneth Miller


More information about the Grok-dev mailing list