On Wed, Dec 26, 2018 at 12:28 AM Gerhard Schmidt <[email protected]> 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.

-- 
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/CAH9f%3Dup6ooTCPNk6MorrZia6SYt7z14FcqJiquGvvHMq5vMe0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to