Sorry, I did not understand all your question well, to my first answer I 
must add that the search form displayed on the site is nothing more than a 
block of the base.html template
{% block navbar_search_form%} {% search_form "all"%} {% endblock%}
where search_form is nothing more than a template-tag. Then you can create 
a template that extends *base.html* and include the navbar_search_form 
block with a custom template-tag
{% block navbar_search_form%} {% my_custom_template_tag_for_search%} {% 
endblock%}




Il giorno martedì 5 settembre 2017 12:20:28 UTC+2, si...@e5r.no ha scritto:
>
> Hi, I’m wondering whether there is any smart way to customize the URL
> used for the built-in Mezzanine search view besides the methods
> mentioned below.
>
> Say that you want to change the search URL from the default `search`
> to `my-search`. A first attempt might be:
>
>   url("^my-search/$", search, name="search"),
>   url("^", include("mezzanine.urls")),
>
> Now you get a search page at `my-search`, but the search view still
> redirects to Mezzanine’s `search` since that one is registered later.
>
> This will fix it, but it doesn’t feel optimal:
>
>   url("^(?!my-search/)", include("mezzanine.urls")),
>   url("^my-search/$", search, name="search"),
>
> Another approach is to give `my-search` another name, copying
> `search_form.html` from Mezzanine and changing `{% url "search" %}` to
> use the new name. This works fine, but it feels a bit wasteful unless
> you’d like to customize the template some more, and it creates more
> work if you’d like to receive updates to `search_form.html` from
> future Mezzanine versions.
>
> Could a cure for all of this be to add a setting for the search URL,
> defaulting to `search`?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to