Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: Handling changed entry titles #7

Open
steveparks opened this issue Jun 27, 2024 · 0 comments
Open

Discussion: Handling changed entry titles #7

steveparks opened this issue Jun 27, 2024 · 0 comments

Comments

@steveparks
Copy link
Contributor

At the moment the addon is very simple, and simply looks for [entry title] in text and replaces it with a link to the entry.

But what if somebody writes Post 2, with a reference back to [Post 1]... and then someone else edits the title of Post 1?

At the moment that would result in the link failing and just showing as plain text rather than a link.

So, how could this be handled more gracefully?

Options:

  1. When a user changes a post title, the addon hooks into the save, searches for [post title] references in all other entries and updates them
  2. Change the point at which the link is identified and created. Instead of doing it on the fly at page generation time, do it at entry creation time, so the field content itself is updated to have a markdown style link in the format Entry title.
  3. As with number 2, but instead of creating a link, the addon at entry save time creates a custom markdown-like tag with the entry id, like [Entry title]{entry-id}. Then at page generation time, the addon creates a link by finding the uri for that page-id, and displaying it with the title in the tag.
  4. Have a way of identifying failing wikilinks and showing a widget in the admin panel, so editors can fix manually
  5. Instead of failing by not adding a link, create a path to a search page with the tag text as the search terms, so the user is taken to a list of likely relevant pages. (this could also create a log for the widget in number 4.
  6. Something else?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant