Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/+dynamic_page_folder_element.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix `dynamic_page_folder_element` handling in the dynamic page view, avoiding an extra call and using `nocall` to check its presence. @libargutxi
8 changes: 6 additions & 2 deletions src/cs_dynamicpages/views/dynamic_view.pt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
<metal:main fill-slot="main">
<main id="dynamic_pages_content">

<tal:condition-configuration condition="view/dynamic_page_folder_element">
<tal:condition-configuration define="
dynamic_page_folder_element view/dynamic_page_folder_element;
"
condition="nocall:dynamic_page_folder_element"
>
<tal:conditiondrapanddrop tal:condition="view/can_edit">
<script id="sortable-js"
src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"
Expand Down Expand Up @@ -581,7 +585,7 @@
<button class="btn btn-primary"
id="addAsTemplate"
type="button"
data-uid="${python:view.dynamic_page_folder_element().UID()}"
data-uid="${python:dynamic_page_folder_element.UID()}"
i18n:translate=""
>Save as
template</button>
Expand Down
Loading