By bgilday on
I need to make this change quickly and don't have time to read through the forums.
I have a basic Drupal 5 site - Garland theme. Goto www.madronestudio.com
I need to be able to hide the display of the title. Do you see the little dot (period) just above and to the left of the "Art of Wood" image. This is the title of the page, and I need to hide it.
I need exact instructions on what to do.
Thanks in advance to anyone who can help.
Comments
Do you want it removed on all nodes?
...or just on the one on the frontpage?
/Johs.
the solution
The Solution: in your css file add the following:
#node-55 h2 a {visibility: hidden!important;}
That should do it.
Your css on the front page needs some work also. Look at what happens when the window is resized.
Let me know if that works.
Try this...
page.tpl.php of your Garland theme
in
themes/garland
change the start of line 68
from
to
This removes the title, on the home page only.[where your little dot is.]
Let us know if it works.
Drupal development and themeing, Galway, Ireland
This one works too...
Thank you Alan.
other pages
Can this be done in other pages (i.e. no front page)?
Just remove the whole <?php
Just remove the whole
print $title;and that will get rid of the title
Alan
Drupal development and themeing, Galway, Ireland
That worked great for me
That worked great for me :-)
Thanks
I just wanted to say
I just wanted to say that
worked great for cleaning up my front page. (drupal 6)
Solution
Go to themes/garland, and you will see node.tpl.php. This is the template of every article on your site.
Open it.
You will see this code:
This is displaying your title.
Solution: make a sepparate template
Copy node.tpl.php to node-frontpage.tpl.php.
node-frontpage.tpl.php is the node template for the frontpage only, as you can see from it's name.
Open node-frontpage.tpl.php and delete the code above.
This will remove the title from any node you put on the frontpage (in the future, if you change the frontpage node to some other node, the title will still be removed).
I think this is a better solution than the css fix, since this works for any node on the frontpage, and only removes the title if the node is on the frontpage.
Hope this helps.
Bojan
node-frontpage.tpl.php nor node-homepage.tpl.php
I have some problems understanding a thing in Drupal template system.
I've been able to customize the frontpage in this way:
- I created a new homepage aliased "homepage" with the panels module.
- I modified the default homepage in /admin/settings/site-information
- I've been able to customize the page listing view by duplicating page.tpl.php into page-homepage.tpl.php
(in this way I've been able to delete the breadcrumbs, to modify the padding, delete the H2 title, etc. etc)
I'm not able to customize the nodes being listed in the new homepage though!
I would like the title to display inside .content class DIV, but I'm not able to reference the nodes properly!
I tried creating node-homepage.tpl.php and alternatively node-frontpage.tpl.php but the things I modify in this files simply won't appear...
What am I missing? Where am I wrong? Can someone help me on the matter?
Thank you.
Same problem... anyone know?
Same problem... any advice?
Same problem
I have the same issue with Panels.
A Panels page is called /category4 and lists 3 types of nodes, from different terms. When I name a tpl file "node-category4.tpl.php", it isn't read, but uses the default node.
Any suggestions?
Solution:
I added this code to the "template.php" file, which resides in the folder of my current theme.
I can now use a file called node-CATEGORY4.tpl.php as the node-template.
PS: If the script fails and tells you that the function has allready been called, replace that code with this one if it doesn't kill the rest of your page.
Cheers
I can't get
I can't get node-frontpage.tpl.php to work -- the template is using node.tpl.php even for nodes displayed on the front page, whether as promoted to the feed or set as the entire front page in the site information options.
Not a default suggestion
I amy be wrong but as far as I know, *node*-frontpage is not a default suggestion in phptemplate engine, *page*-front is. You will need to add that suggestion to your template.php for that to work. While this handbook page (http://drupal.org/node/117491) is for adding path alias' as suggestions, you can see how the
$vars['template_files']is the var that you need to add the suggestion to the _phptemplate_variables hook.Drupalize.Me, The best Drupal training, available all the time, anywhere!
It worked. Thank you.
Zahor's fix to make the simple one-liner addition to my style.css did the trick. Since his was the first post, he gets the bounty.
I haven't tried the other suggestions yet, but I will since they seem more robust.
Much appreciated.
Brian Gilday
Municode
www.municode.com
I would say
the CSS "fix" is the worst one to impliment. I'd give my vote to the php one that checks to see if the page is the front page.
And for the guys trying to make a template for the homepage -
I created my own front page this week and followed http://drupalzilla.com/tutorial/theming/drupal-custom-front-page
without any problems.
Drupal 6?
I'm trying to do the same thing in Drupal 6, but it looks like things have changed. I just have a
print $content, and that is printing the title along with the content. Any ideas on the best way to change that?Thanks!
Nevermind!
What is it about posting a question that you always find the answer two seconds later?
I was looking in the page.tpl.php. Once I created node.tpl.php, it worked as expected.