fix: market URLs include post slug prefix
Nav entries template now links to /<post_slug>/<market_slug>/ matching the events app calendar URL pattern. market_url_for() updated to accept post_slug parameter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,10 +37,10 @@ def events_url(path: str = "/") -> str:
|
||||
return app_url("events", path)
|
||||
|
||||
|
||||
def market_url_for(market_slug: str, path: str = "/") -> str:
|
||||
def market_url_for(post_slug: str, market_slug: str, path: str = "/") -> str:
|
||||
if not path.startswith("/"):
|
||||
path = "/" + path
|
||||
return market_url(f"/{market_slug}{path}")
|
||||
return market_url(f"/{post_slug}/{market_slug}{path}")
|
||||
|
||||
|
||||
def login_url(next_url: str = "") -> str:
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
{# Markets #}
|
||||
{% for m in markets %}
|
||||
<a
|
||||
href="{{ market_url('/' + m.slug + '/') }}"
|
||||
href="{{ market_url('/' + post.slug + '/' + m.slug + '/') }}"
|
||||
class="{{styles.nav_button_less_pad}}">
|
||||
<i class="fa fa-shopping-bag" aria-hidden="true"></i>
|
||||
<div>{{m.name}}</div>
|
||||
|
||||
Reference in New Issue
Block a user