[PR #737] [CLOSED] POC: Dynamically Render Entity Links #5703

Closed
opened 2026-02-05 10:14:44 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/737
Author: @timconner
Created: 3/7/2018
Status: Closed

Base: masterHead: DynamicLink


📝 Commits (3)

  • 9a44bae Dynamically Render Page Links
  • 1d27c73 Inclusion of Chapters and Books in Dynamic Linking
  • a6f3c9d Write blank href on bracket count mismatch

📊 Changes

1 file changed (+58 additions, -1 deletions)

View changed files

📝 app/Repos/EntityRepo.php (+58 -1)

📄 Description

Example render code for #732.

This will transform any link that has the HTML code like the following code block to the pages actual URL using page->getUrl(): <a <a title="Test Link" href="{{@page-id}}">Link Text</a>

Added support for Chapters and Books as well.
Chapters: <a <a title="Test Link" href="{{{@chapter-id}}}">Link Text</a>
Books: <a <a title="Test Link" href="{{{{@book-id}}}}">Link Text</a>

Incomplete Solution
This only handles the page rendering. The editors and link selection screens will not support this (yet). I modified the page's html in the database for testing the render functionality.

This also does not currently have a way to handle links to Chapters/Books, but I just wanted to put out a proof of concept.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/737 **Author:** [@timconner](https://github.com/timconner) **Created:** 3/7/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `DynamicLink` --- ### 📝 Commits (3) - [`9a44bae`](https://github.com/BookStackApp/BookStack/commit/9a44bae49a3358aa064f175e414cf3b97397154c) Dynamically Render Page Links - [`1d27c73`](https://github.com/BookStackApp/BookStack/commit/1d27c73d224b461f1cfde476ca7a3595e564d20a) Inclusion of Chapters and Books in Dynamic Linking - [`a6f3c9d`](https://github.com/BookStackApp/BookStack/commit/a6f3c9d3305b32c21b25709e4cb4ab95e929fc2a) Write blank href on bracket count mismatch ### 📊 Changes **1 file changed** (+58 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `app/Repos/EntityRepo.php` (+58 -1) </details> ### 📄 Description Example render code for #732. This will transform any link that has the HTML code like the following code block to the pages actual URL using page->getUrl(): `<a <a title="Test Link" href="{{@page-id}}">Link Text</a>` Added support for Chapters and Books as well. Chapters: `<a <a title="Test Link" href="{{{@chapter-id}}}">Link Text</a>` Books: `<a <a title="Test Link" href="{{{{@book-id}}}}">Link Text</a>` Incomplete Solution This only handles the page rendering. The editors and link selection screens will not support this (yet). I modified the page's html in the database for testing the render functionality. This also does not currently have a way to handle links to Chapters/Books, but I just wanted to put out a proof of concept. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:14:44 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5703