A link field type?

I’m sure there is a simple way to make all of a specific type of data created on an app clickable and have them redirect to any page, say a profile page where data has been sent. I hope someone can help me with figuring out how to do this. . .

But wouldn’t it be great if one could simply create a data type and then have the ability to create like a field (say, username) that was a field type of “link,” and then be able to point that link to a profile page, for instance?

Back to my real question, how can I make all usernames created on my app redirect to a profile page I’ve created without setting up an intermediary page with repeating groups and a button?

Thanks in advance!

You can do exactly that - just use the thing’s ‘Link’

how can I make all usernames created on my app redirect to a profile page I’ve created without setting up an intermediary page with repeating groups and a button?

Just set up a page with the desired content type (I.e. User) then just direct people to that page with either the thing’s slug or unique ID (you can also use the things ‘link’ for that, or use ‘Data to send’ if using a workflow or link element from within your app).

Wow. . .So many ways it turns out.

  1. What’s a thing’s link? How would I create that?
  2. By ‘direct people to that page with . . . a slug or unique ID’ you mean that I can assign my user thing a slug so when people click it, it’s actually a link? How would I do that exactly, please?

Could you break it down for me?

If I understand your question, to redirect to a profile page using usernames, I think you can create a database with field “username” and “url” (type text), then direct to page using workflow (implement some conditions if needed).

Hope this help.

Samson @ Plugin Developer
Plugin Page
Plugin Forum

Using a workflow, wouldn’t I have to direct to page in each instance?

For every ‘Thing’ in your database you can directly access a ‘link’ to each page that has that Datatype as its content type. You’ll find it at the bottom of the list of fields for that thing in the dynamic data dropdown:

image

(of course you can just manually type the link instead, using the page name and thing’s slug or unique ID - but using the ‘link’ expression keeps it dynamic, in case you change the name of a page, or change a slug in the future)

  1. By ‘direct people to that page with . . . a slug or unique ID’ you mean that I can assign my user thing a slug so when people click it, it’s actually a link? How would I do that exactly, please?

I’m not entirely sure what you mean by ‘when they click it’? - obviously anything in your app can be clickable, and you can run a workflow to navigate your user to a page when anything is clicked…

But yes, every thing in your DB can have it’s own unique slug (you need to set those in a workflow), that can simply be appended to the URL as a path parameter AFTER the page name (i.e. my-site.com/my-page/slug) - and the relevant page will load with the correct data.

If you don’t set a slug, then the thing’s Unique ID must be used instead.

But if you’re talking about navigating to those pages internally, from WITHIN your app (which I think you are) then you can just create a LINK element in your app and select the page to link to, and add the Data To Send as the thing you want to send…

So in most cases no need to use the Link expression at all (or you can use a ‘Go To Page’ workflow, and do the same).

Using a workflow, wouldn’t I have to direct to page in each instance?

Perhaps I’ve misunderstood the question… but what are you trying to do if not direct your users to a page?

1 Like

Hi @adamhholmes, thanks for taking the time to explain things. You’ve helped me get a sense of links, but I am failing woefully at implementation.

Here’s what I did:

1

I have a form and a button that collects some additional information for my user data type, including a ‘Display name’ field. I then set the ‘Display name’ field to ‘Get data from page URL’ with type ‘Parameter’ and name ‘This user’s link.’

2

And then I set the page to send to my profile page where it is to be displayed.

3

But since it is not working, I am pretty sure that I flunked this entire logic. Please, guide further?

I’m not sure I understand what you’re trying to do there (or what links have to do with anything here?)…

Are you just trying to set the User’s Display name? If so, what are you trying to set it to?

I am trying to set up each user’s display name to point to a profile page where their data will be sent. And doing so poorly, apparently. LOL.

Do you mean you want to save (as a text) the link to a user’s profile page in the field ‘Display Name’?

For example, you want to set a particular User’s Display Name (text field) as htpps://my-app.com/profile-page/user-slug ?

If that’s the case, al you need to do is set the Display Name to the User’s Link (then select the relevant page).

Although I’m not sure what the purpose of doing that would be?

What is it you’re trying to achieve? (why do you need to save that link as a text in the database?)

Well, the whole idea is that I want the usernames to be clickable wherever they are found on the app. And when they are clicked, I want the current user to be taken to the current page user’s profile page (the single page where I have sent all that data). I actually don’t want to set any particular user’s display name like this, I want all users’ usernames to behave like this.

Kindly, if you follow me, do give me the steps instead of explaining the concepts. The logic of why I am doing what will come to me as I am doing them. That’s unfortunately how best I pick up technical stuff. Thank you.

You can make any element on the page clickable…

So in your case, wherever you’re displaying the User’s Username (presumably in a textbox), all you need to do is run a workflow when that element is clicked, and use a Go To Page action to send the User to the profile page, with the data to send to be the relevant User.

That’s all you need to do…

Alternatively, you might prefer to use a link element (instead of running a workflow), in which case you can set the link text to display the User’s Username, and the link destination to be the Profile page link of the particular User.

Okay, many thanks.

1 Like