Maybe this is something you can already do - if so then instructions would be great. But if not, is there any way you could make textimage render images instead of page titles in
HTML - on the fly from the database as new pages are added?
This would be something I could utilise a lot!
Comments
Comment #1
dman commentedThat's what it does.
You'll need to invoke it from your theme, with something like
where you used to have the title
... I believe
Comment #2
adshill commentedOk, great - thanks for that! Thats what I had hoped for and it looks great. However there is a further issue in that for the core drupal produced pages (/blog, /forum/*, /contact, /user/* etc..) the title doesn't show up - either a blank image or nothing at all. Works fine on all node pages and also on comments etc.
Any ideas?
Comment #3
dman commentedOK, that was rough code OTTOMH
Those pages do not have $node->title as they are not nodes.
Instead you want drupal_get_title().. or $title ... or whatever it was you deleted from there :)
I can't remember but it's in the original source
Comment #4
BradM commentedThis is something similar I put together a while ago. It works for me, never got any responses to the original post but I think it's safe. ;)
http://drupal.org/node/134603
What it does: using the textimage module, this code auto-replaces all node titles with a fancy graphical title, and will split the title onto two to three lines if it exceeds a certain length. It also attempts to clean up the title a bit so the graphics are named safely in unix.
I modified it a bit since then, however. This is the new code I use:
This code goes within the template.php file -- you then call it from within node.tpl.php by using print fancy_title($title);. This way, if you have different node templates, you can pick and choose where you put it.
Note: the above only affects node titles.
You can also have it create fancy block titles by creating a block.tpl.php file and adding this code, or if the file already exists, modify the existing code:
Brad
Comment #5
BradM commentedHey, something I just discovered.
Edit page.tpl.php --
If you change this line:
<h1><?php print $title ?></h1>To this:
<?php print fancy_title($title); print "<BR>"; ?>It'll auto-change all titles on your pages.
Brad
Comment #6
deciphered