Implement parallax effect on Header image from Content type field I have a Header image which i can upload per node from my Basic-page Content type. I want to implement this parallax effect, on my Header image section. But I need to add:

&lt;div class="parallax-window" data-parallax="scroll" data-image-src="/path/to/image.jpg"&gt;&lt;/div&gt;.

How do I add data-image-src="/path/to/image.jpg" to the wrapping &lt;div&gt;? It has to be dynamic and per node you must be able to attach a specific image.
Where do you need to add that code? Into field.tlp.php, node.tpl.php or page.tlp.php? Is it D7 or D8?

If you need to extract src atribute (/path/to/image.jpg) from some HTML code (for example from the node.tlp.php field) then use Google. When you will have src then you can create desired &lt;div&gt; element in your template files.

As universal answer as detailed question was.

Update:

I found that you have attached your site so I suggest this:


Create block in Views for header image field


NID as Contextual Filter
Enable cache per page
Output header image field as src (only image url) - there is such option in views or use this module
Override that field (rewrite the output of this field) with something as &lt;div class="parallax-window" data-parallax="scroll" data-image-src="[image_src]"&gt;&lt;/div&gt;
enable block in proper region only for "Basic-page" CT