Hi,
I have a different banner for each section of the website and I would like to add a link to them back to the homepage. The banner is called via a TV called [*banner-img*]
I tried to set up an additional TV called [*BannerLink*] (input type URL) but that does not seems to work.
Any ideas of the best way to apply this in Modx?. I have looked back through the threads but could not find an answer
Many thanks
w
If the href is always going to be to the same you can try and hard code the link that surrounds your template variable.. <a href="[~1~]">[*banner-img*]</a> - or use Ultimate parent if it is linking back to the top most page in a section... or the TVs you set up shopuld work if you have it hard coded in the template as <a href="[*BannerLink*] ">[*banner-img*]</a>
The banner is referenced in the template as:
#header {background: url([(site_url)][*banner-img*]) top center no-repeat; }
Still not sure how to add the <a href="[~1~]">[*banner-img*]</a> into that line so that all the section banners link back to the homepage.
Whatever I try does not work
Sorry for lack of knowledge still just a beginner.
Thanks
w
since the image is a background graphic you won’t be able to add an href to the image. You may be able to add a transparent .gif file in the header div tag to hold the href---
can you copy the <div id="header"> content ainto a reply and I can show you how to update it..
CP hi,
Here is everything related to the header image:
<style type="text/css">#header {background: url([(site_url)][*banner-img*]) top center no-repeat; }
</style>
.............................................
<div id="header">
<!-- end #header --></div>
..........................................
CSS extract:
#header {
padding: 0 0px;
width: 978px;
height: 180px;
/*background: url(../images/banner2.jpg) no-repeat;*/}
Thanks
w