Jump to content

Using insert link in regular field


Recommended Posts

I would say you need two fields, one for internal PW pages - use a Page field with Deref in API set to: Single page (Page) or empty page (NullPage) when none selected and Inputfieldtype set to PageListSelect+ 

You can set the Parent of Selectable Pages to Home or any subbranch.

For the external URL option, use the URL fieldtype so your editors can manually enter a URL. 

Then in your template code, check which one has a value and use that for the link.

You may want to add a showif dependency so that as soon as one field has been populated, the other one is hidden. 

  • Like 1
Link to comment
Share on other sites

  • 7 years later...
On 12/5/2014 at 5:09 PM, OllieMackJames said:

Thanks adrian, I just found out that what I want already is part of profields...

I am using ProFields but none of them opens an "Insert Link" modal box…

I can remember I saw a module that does exactly that (url for internal or external pages, page select, target) but I can't find it anymore...

Link to comment
Share on other sites

3 minutes ago, adrian said:

I just tested and it's working fine here. Can you take a look at the browser dev console to see if there are any JS errors?

As Kholja mentioned:

it works only if there is a Texarea Field that uses CKEditor. And ideed, it works… but this dependency is strange… but not technically

  • Like 1
Link to comment
Share on other sites

5 minutes ago, adrian said:

Does a modules > refresh help?

If I'm opening the Module Update Page (/processwire/module/?reset=2) there ist nothing to update:


On the module page, if I hit "Look for an update" the backend outputs: "That module is not currently tracked by the modules directory":


Link to comment
Share on other sites

That's because my repo is a fork of the original and not in the modules directory - you need to install from Github. Does that help?

Actually, I see that is what you installed. Not sure why it's reporting 2.0.0 still. I guess the key thing is it now working without a separate CkEditor field? 

Also, can you see the updated file (with those changes I committed) in the folder under site/modules ?

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

  • Recently Browsing   0 members

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