Hi Mike, Am Mittwoch, 26. Dezember 2018 19:04:37 UTC+1 schrieb Mike Orr: > > On Wed, Dec 26, 2018 at 12:28 AM Gerhard Schmidt <[email protected] > <javascript:>> wrote: > > is it possible to store additional information in the view config. > > > > Background is that i would like to add more information the the view > > processed later by the layout tho generate the navigation of a page > > automatically. > > > > I would like to store the title of a page (for the navigation link) and > > the navigation type. > > > > The simplest solution would be to copy any unknown keyword arguments > > given to view_config to the Introspectable or be able to add custom > > keywords to be copied via config statement like adding custom predicates > > to the view config. > > I don't know whether you can store additional args this way, but it > sounds like the wrong structure for this kind of information. A page > title is page specific, not view specific, and parent titles (for > navigation links or previous/next links) sound like resource > information. Is this a pure URL Dispatch application with no resource > tree that could hold this information? I generally put my page title > in a Mako template function or I set it during the view's action. If > you have class-based views, you could store the navigation tree in a > view class attribute, and then use the runtime view's name to figure > out the current position in the tree. You may not need a multilevel > tree to navigate just one level up and one level across, with a > well-known "Home" link above that. >
first, why didn't i get you mail via mailinglist? It's a traversal application. so views are bound to context rather than urls. Right now i have a action_config decorator that adds a view with the given information and store the additional information in a second Introspectable in the registry. Would be much more convenient to store this information directly at the view. The pagetitle in my application is quite view specific and the navigation I am implementing is not only the site navigation (the site navigation is quite trivial) but the navigation within the object which can be quite complex. Storing this information in the registry works quite well for me. And being able to do that directly in the view Introspectable would cut some complexity. But my use case must not be the only one. So I think the question is not if the view Introspectable is the right place to store a pagetitle. The question is, should there be a way to store more information in the View Introspectable and how difficult is this to be implemented. Regards Estartu -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/cec9345d-71cb-432b-87be-ac51d68c9a5e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
