1

I bought a new theme and I am not getting much support from the place I bought it from. My theme has nice fancy titles in blocks, which are implemented using the Cufón module to change the text. I was wondering if it was possible to do the same with the title of my views.

I have tried overriding the views-view-table-tpl and added <h2 class="title cufon"> around the title, but it didn't have any effect.

How can I achieve this?

2

Edit the page.tpl.php template, and add the cufon class to the page title (<h1>). Alternatively add a h1.title rule to the Cufón module.

If you dont't use the Cufón module, add this to your template.php.

drupal_add_js('Cufon.replace('h1.title');', 'inline');
|improve this answer|||||
  • thanks ipwa but that isnt doing it for me. I'll have to keep digging thanks. – Reg Gordon Nov 25 '11 at 20:49
  • Hi Reg Gordon, I just saw that in line 1165 of your Drupal aggregated file that cufon is being called on all elments with the cufon font. Cufon.replace('.cufon'); That means that if you get the cufon class to your page titles, then your title will get the font replaced to Futura Md BT, which is the cufon font you're using. If you add the class to your page.tpl.php and then clear your cache, I am sure you will get the desired effect unless there is another template intercepting the page.tpl.php – ipwa Nov 25 '11 at 23:11
  • Updated my answer to have an alternative solution, remember to clear cache when modifying templates. – ipwa Nov 25 '11 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.