Jump to content

[SOLVED] URL in admin as clickable links


rash
 Share

Recommended Posts

Hi guys,

I’m dealing with a problem that first didn’t even look as one, before I found out that it might not be that easy. I would like to have a link list of external sources referenced by page X. Something similar to the Page field but for external web pages and with different numbers of references. I tried to do it with a repeater field containing a text input and an URL field. That’s nearly all I want, except that I’d like it to be clickable on the admin page like so:

<li><a href='URL_1'>TEXT_1</a></li>
<li><a href='URL_2'>TEXT_2</a></li>

The link list will be used for admin purposes only, as there are several research sources per page, that would be faster accessible than by copying/pasting URLs out of the input fields. So it’s more an admin GUI problem, as it would of course be no big thing to render a link list on the frontend.

Any ideas to get that done?

 

Link to comment
Share on other sites

32 minutes ago, rash said:

clickable on the admin page

Where exactly? "on the admin page" is a bit vague...

  1. In the top menu?
  2. In a particular page when in page-edit mode?
  3. In the page-tree?
  4. elsewhere?

For use-case 2, you could try https://modules.processwire.com/modules/fieldtype-runtime-markup/

Another very useful module is https://modules.processwire.com/modules/page-field-info/ - especially if you need to provide contextual information based on your selection (checkboxes, radio buttons, page fields, options...).

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Thanks a lot, dragan. You’re right, I should have specified the "where" a bit more – in this case I meant the page itself in edit mode as in your case 2. Anyway, I checked out the runtime markup field and it does exactly what I was looking for with very little effort. Perfect solution!

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