How to use random links to browser field?
I wanna add random link to browser field.
How to do that?
4 Replies
Hi @HealMan do you mean if the browser field is empty in the CMS, you want to render a random record in your frontend as a fallback?
Hi, @ifox , I mean we only can use internal link or slug for browser field...
How to add external links?
Ok, by random, you meant external. it wasn't obvious... a browser field is meant to attach a record that exists in your CMS, so I'm not sure how it would store an external URL. However, this is usually achieve with both a browser and a standard text input for external url. You can use a conditional field to let the CMS user choose between internal or external. Or you can create a dedicated model for your external links so that you can browse them in the CMS, but that's most likely overkill
Thanks for your advice.
I will think more about it and if I have more questions I will let you know.