New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

full url for anchor tags?

Connor Leech January 27, 2021 by Connor Leech

I'm using Statamic starter's creek template and have some links in there that use the url variable as in the code below. These output relative urls like: /topics/my-topic. How can we output the full site URL like https://mysite.com/topics/my-topic? Is there a helper function we can use?

This is the snippet I'm looking to update, modifying the href value..

{{ taxonomy:topics sort="title" }}
            <h2 class="text-4xl font-bold hover:text-teal">
               <a href="{{ url }}">{{ title }}</a>
            </h2>
{{ /taxonomy:topics }}
>>>>>>> Unanswered <<<<<<<
1 Reply
2 Followers