diff --git a/src/moin/apps/frontend/views.py b/src/moin/apps/frontend/views.py index b5f0021e5..926d15472 100644 --- a/src/moin/apps/frontend/views.py +++ b/src/moin/apps/frontend/views.py @@ -697,9 +697,7 @@ def slide_item(item_name, rev): if isinstance(item, NonExistent): abort(404, item_name) data_rendered = Markup(item.content._render_data_slide()) - return render_template( - "slideshow.html", item_name=item.name, full_name=fqname.fullname, data_rendered=data_rendered - ) + return render_template("slideshow.html", item_name=item.name, data_rendered=data_rendered) @presenter("get") diff --git a/src/moin/macros/SlideShow.py b/src/moin/macros/SlideShow.py index 7a5e2ce8e..919a2d025 100644 --- a/src/moin/macros/SlideShow.py +++ b/src/moin/macros/SlideShow.py @@ -5,6 +5,7 @@ Create link to start a SlideShow for the current item """ +from flask import url_for from moin.i18n import _ from moin.utils.tree import moin_page, xlink from moin.macros._base import MacroInlineBase @@ -14,5 +15,6 @@ class Macro(MacroInlineBase): def macro(self, content, arguments, page_url, alternative): attrib = {moin_page.class_: "fa-regular fa-circle-play"} children = [moin_page.span(attrib=attrib), _(" Start SlideShow")] - result = moin_page.a(attrib={xlink.href: f"/+slideshow{page_url.path}"}, children=children) + url = url_for("frontend.slide_item", item_name=page_url.path[1:]) + result = moin_page.a(attrib={xlink.href: url}, children=children) return result diff --git a/src/moin/templates/slideshow.html b/src/moin/templates/slideshow.html index c6228471e..68aa1ca51 100644 --- a/src/moin/templates/slideshow.html +++ b/src/moin/templates/slideshow.html @@ -17,8 +17,11 @@