-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Media's url(…) should offer include_host-Parameter #894
Comments
Skip the last Paragraph, one can prepend |
Pretty sure this already takes into account the system.yaml based |
Yes, probably. I needed it here for a Pinterest sharing link, which needs the hostname but just in this place. |
Can you explain the use case in details, to understand what's the problem and how did you expect it to work? |
I think he programmatically want's to flag a particular media URL to use full URL rather than using whatever the default style is. so:
To provide a full |
@rhukster exactly. My Use-Case currently looks like this: {% set url = uri.url(true) | url_encode %}
{% set desc = page.title | url_encode %}
{% set image = (uri.base ~ (page.media.images | first).url) | url_encode %}
<a class="pinterest" href="https://pinterest.com/pin/create/button/?url={{ url }}&media={{ image }}&description={{ desc }}" data-width="1200" data-height="630">
Pinterest
</a> I had expected for |
Ok got it, you can do via |
A [Media's
url(…) Method](https://learn.getgrav.org/content/media#url) does not offer a
include_host`-Parameter like the Page-Object does.Furthermore there seems no other way to add the Hostname to a Media's URL.The text was updated successfully, but these errors were encountered: