Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Jimerson on
I hope this is the right place to put this. My appologies if I am incorrect.
On my design I have 3 images that will link to headline text. Is there an easy way to change the images and what they link to?
I know I could just open the template file and change it but I would like to make it easy on my staff.
Thanks for your help all.
-Jim
Comments
Switching template elements dynamically
I documented a code snippet that I developed to enable me to switch between a few page header images (and anything you may want) based on the URL or other condition that can be tested using PHP
http://www.cmsproducer.com/drupal-switching-template-elements-path-url
-----
iDonny - Web Productions: Web Strategy, CMS Design, Branding, & Production
You could use a custom block
You could use a custom block placed in the header and style the heck out of it. That way you can chage the link to the image when ever you want.
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Stephen, Could you please
Stephen,
Could you please explain more about what you are talking about?
Or point me to a guide please?
Thanks,
Jim
How to use a custom block to swap page headers
I am not sure if Stephen answered you, but here is how you can implement the same thing with a custom block.
If you are not using Drupal 4.7, you may need to implement flexiblock to apply the following.
If you are using Drupal 4.7+, do the following
1 - Edit your Drupal theme/template to add a custom block region in the place of the page header as explained here
2 - Create as many blocks as you want to have headers and set them to display in the new block region that you created in (1)
3 - Configure each of the blocks created in (2) to display only with certain pages (in the configuration section of each block) and remember to make each mutually exclusive so that you do not end up with more than one header/block on the same page at the same time
Voila, you have your different headers displaying on different pages. Let me know if you need more details or help with this.
-----
iDonny - Web Productions: Web Strategy, CMS Design, Branding, & Production