Skip to content

Commit

Permalink
Merge pull request #354 from pratikb64/page-routing-fix-2
Browse files Browse the repository at this point in the history
fix: update page name after routing the page
  • Loading branch information
pratikb64 authored Feb 20, 2025
2 parents ea5b7c3 + 2c82ffd commit 145ef62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions wiki/public/js/wiki.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ function loadWikiPage(url, pageElement, replaceState = false) {
// Get the wiki page name from the parent element's data attribute
const pageName = $(pageElement).closest(".sidebar-item").data("name");

// Update wiki page name for other functions
wikiPageName = pageName;

frappe.call({
method: "wiki.wiki.doctype.wiki_page.wiki_page.get_page_content",
args: { wiki_page_name: pageName },
Expand Down
2 changes: 1 addition & 1 deletion wiki/wiki/doctype/wiki_page/templates/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h5 class="modal-title" id="addGroupModalTitle">Title</h5>
{{ include_script('wiki.bundle.js') }}

<script>
const wikiPageName = `{{name}}`;
var wikiPageName = `{{name}}`;
function getSidebarItems() {
let side = {};

Expand Down

0 comments on commit 145ef62

Please sign in to comment.