Hi there,
The website I look after has a number of sections, like products, solutions, industries etc, and each one has a separate image. This all works fine, but now the powers that be want the banner image to be more specific. So for example, rather than one generic image covering all the Industry section, they want a different image for “Medical”, “Aerospace”, “Energy”, etc…
In the current set up, each section has one template, and all sections use the same banner .include file. There is also a banner weblog that has an entry for each section, and these entries relate to an image in the media module.
What I thought would be simpler would be to just create an additional field for each section weblog called banner_section (e.g. banner_industry).
So just inside the body tag I would have something like this:
<!-- INC PAGEBANNER -->
{embed="includes/.pgbanner" loc="{my_weblog}"}And the .pgbanner code would look something like this:
<div id="pb_wrapper" class="noprint">
{exp:weblog:entries weblog="{my_weblog}" disable="categories|member_data|pagination|trackbacks"}
banner_{my_weblog}
{/exp:weblog:entries}
</div><!-- /pb_wrapper -->Of course it doesn’t work, and I have tried so many things to no avail. Although not new to the site itself, I’ve never really had to tinker under the bonnet…
I’m clearly doing something majorly wrong lol, as I get nothing displaying now!
Any suggestions or guidance are warmly welcome.