I need to hide the display of the title on the front page of our website.
I have temporarily called the front page “____________” so it appears as a line going across the page. See: www.tinyurl.com/kjqme4
I have looked in the forums and thought this was the answer: http://drupal.org/node/137924 . I tried both solutions with no success. I tried changing the style.css and my website went crazy (so I will not try that option again!). I also tried “bojanz’s” suggestion of creating a “node-frontpage.tpl.php” but it had no effect.
I have been able to hide the other pages from having a title by using this method – http://community.contractwebdevelopment.com/drupal-hide-node-title#comme... (this may be the reason the above solutions did not work). I then created a page-front.tpl.php with this same code removed but it also made my site go crazy!
I have also tried this without success: http://drupal.org/node/138910
Please help – I have had a few scary moments where it has made my site look very wrong!
Comments
Comment #1
decibel.places commentedHi Michael,
add this to your CSS:
div#node-30 h2 a {display: none}you can use Firefox+Firebug and the Web Developer/Edit CSS tools to inspect CSS selectors and try out code in your browser
the methods you referenced involve modifications to your theme template PHP - the advantage is that if you were to change the node that is on your front page, they would work but the CSS would need to be adjusted for the new node number
sometimes, however, a quick CSS fix is the ticket - and if you are adding a custom stylesheet in your theme's .info file then it will be preserved when you update your theme, while the template hacks would need to be readded
Comment #2
MichaelT commentedThank you - it has worked perfectly.
Comment #3
decibel.places commentednot an issue specific to the Minnelli theme...
Comment #4
MartinD-2 commentedVery nifty solution indeed, thanks!
The only thing you have to remember now is not to style any other content with
<h2>in that node.I've been struggling with these Titles for some time now. How come they are mandatory fields anyway (even for content types I create from scratch)? Or, to put it differently, why can't you just put Blocks into a Content Region?
Comment #5
decibel.places commentedactually, it only affects the anchor "a" tags within h2 tags in the node - other h2 tags without embedded links are fine...
Comment #6
abhinya commentedThank you that was very helpful