Jump to content

How to find a page in process wire admin given a URL


Peter Oehman
 Share

Recommended Posts

So I'm working on a site that already has many pages, and I'm having a hard time finding the templates and process wire pages being used. I would like to be on our website, look at a page on our website, and find where that page is in our templates/ process wire pages, given the URL. Is there a way to do this?

Link to comment
Share on other sites

With respect to templates, from the frontend, there is no way to tell. You might get a clue from the URL but there is no guarantee that the developer who worked on the site previously did not implement some sort of URL mapping/ rewriting. In addition, the page name (this is what is used to build the URL on the fly) is not guaranteed to match the page title since the previous developer might have amended those as well. Instead, I'd suggest using Lister to show you the information for various aspects of a page. If you don't have Lister Pro, use the core module Lister. Head to you menu Pages > Find. The select the Tab 'Columns' and add Http URL or URL depending on your needs. Templates should already be selected. That should give you a good start. There are filters there as well that you can play with to narrow things down, e.g. filter by URL (URL = /some/url/.

Welcome to the ProcessWire forums ?.

  • Like 2
Link to comment
Share on other sites

In the template code for your website footer you can add something like this:

<?php if($page->editable()): ?>
	<a target="_blank" href="<?= $page->editURL ?>">Edit this page</a>
<?php endif; ?>

This will give logged-in users who have permission to edit the page a link to open the page in Page Edit, and you can work out its location, template, etc, from there.

Or if you have Tracy Debugger installed you can run the following in the Console panel while viewing the page on the frontend and the edit link will appear in the console output:

<a target="_blank" href="<?= $page->editURL ?>">Edit this page</a>

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, kongondo said:

With respect to templates, from the frontend, there is no way to tell. You might get a clue from the URL but there is no guarantee that the developer who worked on the site previously did not implement some sort of URL mapping/ rewriting. In addition, the page name (this is what is used to build the URL on the fly) is not guaranteed to match the page title since the previous developer might have amended those as well. Instead, I'd suggest using Lister to show you the information for various aspects of a page. If you don't have Lister Pro, use the core module Lister. Head to you menu Pages > Find. The select the Tab 'Columns' and add Http URL or URL depending on your needs. Templates should already be selected. That should give you a good start. There are filters there as well that you can play with to narrow things down, e.g. filter by URL (URL = /some/url/.

Welcome to the ProcessWire forums ?.

Thank you! I was able to find the page I was looking for by using search and filtering by name. However I was trying to filter by path/url, but when I type anything into that filter, it shows the error: 

Operator '%=' is not supported for path or url unless: 1) non-multi-language; 2) you install the PagePaths module.

Underneath this error it shows what looks to be the search: 

has_parent!=2, path%=/, limit=25, sort=url, include=unpublished

Where I can see path%=/ (I just put "/" into the search). Am I doing something wrong? For some more context here's a picture of my search

Screen Shot 2022-05-11 at 4.25.04 PM.png

After playing with it some more I found out changing "Contains Text" to "Equals" fixes the problem, can you just not use that option with URL's?

  • Like 2
Link to comment
Share on other sites

when it says 2) install the PagePaths module, you can find the module under modules > core in the admin. By default, the search through urls and paths is disabled, but you can enable it by installing given module.

  • Like 1
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...