Heyo,
So I’m working on two different sites right now that have these “workhorse” pages: Pages which aren’t really about a view as much as they are about populating content for other pages. (pulled with $site->find('page-url')
)
But that solution will fail if after handoff, the client changes the URL to any of those pages. I can tell them not to do that, but I’d like to be able to disable the “Change URL” on a blueprint basis. Is this possible?
1 Like
This is not possible yet, but it should be (as well as showing/hiding pages), so I created an issue on GitHub: https://github.com/getkirby/panel/issues/693
2 Likes
Instead of relying on the page URI, you can give your pages unique IDs that won’t change:
- Add a hidden field to the blueprint of the pages you need the IDs for.
- Pre-populate the field contents for all pages you need from the file system. Users won’t be able to change the values from the Panel.
- Find the page by using
$site->index()->findBy('uniqueid', 'something')
.
Ooh, that’s a fine idea, I’ll try that.