Am I too stupid to use fullUrls Modifier? #5000
Replies: 6 comments
-
Try permalink instead!
… On Jan 2, 2022, at 10:30 AM, Andreas Hartmann ***@***.***> wrote:
Hi,
happy new year to all. I am trying to use the full_urls modifier in my antlers template like this {{ url | full_urls }}
Sad but the the output always stays the relative url. I tried to get the bottom of it and ended up in believing the regular expression used in the modifier might be incomplete? Can anybody point me in the right direction what's going wrong here?
See screenshot:
Expected result: https://www.domain.test/magazin/aktiv-bleiben/test
Instead the result ist: /magazin/aktiv-bleiben/test
Thx and regards,
Andreas
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
-
@jackmcdade works! thx! Any idea why full_urls does not work? Did I misunderstand what full_urls should do? |
Beta Was this translation helpful? Give feedback.
-
It replaces all the relative urls in a longer string, like a content block. It probably SHOULD have worked in your case but I bet it assumes more test than just the url
… On Jan 2, 2022, at 3:55 PM, Andreas Hartmann ***@***.***> wrote:
@jackmcdade works! thx! Any idea why full_urls does not work? Did I misunderstand what full_urls should do?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.
|
Beta Was this translation helpful? Give feedback.
-
It converts URLs of links inside content from relative to absolute URLs. It doesn't just transform a single URL. You need to have |
Beta Was this translation helpful? Give feedback.
-
Thx for the hint! Maybe the description in the annotation could be something like this then: "Replace ="/relative/urls" with ="https://domain.com/absolute/urls." I guess the regex also captures PS: damn regex...! ;-) |
Beta Was this translation helpful? Give feedback.
-
Updated the docs 👍 |
Beta Was this translation helpful? Give feedback.
-
Hi,
happy new year to all. I am trying to use the full_urls modifier in my antlers template like this
{{ url | full_urls }}
Sad but the the output always stays the relative url. I tried to get the bottom of it and ended up in believing the regular expression used in the modifier might be incomplete? Can anybody point me in the right direction what's going wrong here?
See screenshot:
Expected result: https://www.domain.test/magazin/aktiv-bleiben/test
Instead the result ist: /magazin/aktiv-bleiben/test
Thx and regards,
Andreas
Beta Was this translation helpful? Give feedback.
All reactions