Jump to content

Dynamic page links based on page's id instead of URL


woop
 Share

Recommended Posts

Hi!

When linking to a page from the tinymce textbox, I'm presented with a list of pages from my processwire installation. This is super handy and makes it easy to link to another section on my site. The problem is that these links doesn't change when the structure of my site changes. It would be really useful if those links were tied to the page-id instead of a static url. That way, processwire could check the page's url on page load instead of having it hard coded into the body.

Does that make sense?

Link to comment
Share on other sites

  • 4 years later...

Something has gone wrong with @Soma's post - it's appearing just as a loading spinner.

I have just the same question as the OP, who describes the answer as "absolutely fantastic", so it'd be great to know what that answer was!

Link to comment
Share on other sites

@BillH, PW now takes care of link abstraction inside CKEditor fields if the "Link abstraction" setting is checked for the field (which it is by default).

2017-04-07_102339.png.0217137e780016e6ead9e46765eebb00.png

There is also the Page Path History module which will take care of redirects when a page path changes (this works for all pages, not just links inside a CKEditor field).

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...