By annicole72 on
Hello everyone,
Could you please help me how can I replace the node title into a graphic image? I tried to make the changes in the FAQ section by creating a .faq-title css rule, but I can still see the text on top of it. So I tried to delete the css rule for node-title, but I could still see the text. Is there any way I can replace it? If so, what should I do as I am still new with php (but would like to learn it) - is there anything in the page.tpl section that I should get rid of to enable the use of my graphic images? My site is at astrologyloveadvice.com .. It's still new.
Thanks,
Anne
Comments
I need help replacing text titles to graphic image
Anyone?
When I created a rule for .faq-title under .node-title, that particular graphic image showed up on all pages. Is there a way I can replace text titles to customized graphic images?
Thanks,
Anna
_
It's not the page.tpl.php file you want to edit but the node.tpl.php file. Look for something like
<?php print $title; ?>and alter it however you wish-- or must remove it to supress the printing of the title all together. If you only want to do it for nodes of type 'faq', copy it to a new file named node-faq.tpl.php and edit that one instead.I tried to remove it, but
I tried to remove it, but then I got an error. Eekk..
Ahh... so what should I put
Ahh... so what should I put within those < > ? In the node.tpl, just remove that part and create a node-title for individual pages that I want to use graphic images instead of the title in text then?
_
I'm not sure i understand-- how will you determine which nodes get pictures and which don't? I thought you were just trying to change this for nodes of one content type... what is the criteria?
I created some graphics for
I created some graphics for each page/section: FAQ, FORUM, etc..
I was wondering if there is a way for me to use like faq.png (for the faq section), forums.png (for the forum section), etc..
You know how when we create a page, we have to type in a title? Instead of using text as the title, I want to use a graphic that I created in Photoshop.
Sorry if I've confused you.
_
Ah ok, so it is by content type. Then you need to create a node-[contenttype].tpl.php file for each content type, remove the $title code I mention above, and just replace it with plain old <IMG> tags.
Alternatively, you could just use node.tpl.php, and add a bunch of:
One for each content type. That's just a guess-- you'll have to test and tweak it as necessary.
Okay. I will give it a shot.
Okay. I will give it a shot. I will keep you posted and come back here if I have any questions.
Thank you :)
Anna
templates and css
You could also alter your template to add classes to your titles based on what content type they are, and then use css to style the title. For example,
<h2 class="<?php print $node->type ?>"><?php print $title; ?></h2>Then use css like
This approach would help keep your page semantic and keep you a little more accessible.