Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Path for images is incorrect on child pages

Started by Nathan da Silva 6 years ago · 0 replies · 552 views
6 years ago

So I have a file called cliendland.yaml and I have a blueprint which shows up custom fields for all child pages of /clients/

The issue I am having is that the URL when I do the following:-

TWIG
{% for key, img in header.custom.ClientHero %}
    <div id="service-hero" class="page-hero" style="background-image: url({{ key }});">
{% endfor %}

The path for key is showing as:

/clients/user/pages/02.clients/04.main-contractors/contractor-hero-header.jpg

Whereas the file is actually storing it here:

/user/pages/02.clients/04.main-contractors/contractor-hero-header.jpg

You will see that the issue is that it is adding /clients/, either the file is storing in the wrong location or there is an issue with my blueprint file.

Any ideas?

last edited 05/07/20 by Nathan da Silva

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by FrViPofm, 5 days ago
5 100 4 days ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2119 7 months ago
Forms & Blueprints · by Hugo Oliveira, 8 months ago
0 605 8 months ago
Forms & Blueprints · by Flachy Joe, 9 months ago
9 695 9 months ago
Forms & Blueprints · by Augustus, 10 months ago
7 741 10 months ago