All things Shopify and commerce
Hi all,
I've got a new section/block where I show 3 metaobject form the vacancies type.
This metaobject have fields, like title, content, featured image.
Now what i want to create a link to the detail page of the vacancy, but I cant figure out how I get this.
Because I assign vacancies with shop.metaobjects.vacancies.values, vacancies.url is empty. If I delete .values at the end of the assign, all vacancies are empty.
This is the code I use to loop trough the vacancies:
{% when 'open_vacancies' %} {% assign vacancies = shop.metaobjects.vacancies.values %} {% for vacancy in vacancies %} <h3>{{ vacancy.vacancy_title }}</h3> <p>{{ vacancy.vacancy_excerpt }}</p> <a href="{{ vacancy.url }}">Bekijk vacature</a> {% endfor %} {% endcase %}
Solved! Go to the solution
This is an accepted solution.
Resolved:
You have target the system.url .
This is an accepted solution.
Resolved:
You have target the system.url .
Thank you for this solution! Any workaround for localized entries?
I tried
{{request.host}}{{project.system.url}}
which works fine but it's the relative path only
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024