1

Is there some way we can use <br> or javascript line breaks in Node, Page and/or Block Title fields?

6

3 Answers 3

0

When I need that - or something similar - I mostly type something like 'title|subtitle' right in the title field. Then right before rendering, I replace all '|' chars with breaks.

And recently, someone wanted bold & line breaks in titles, so I added a textarea with WYSIWYG and auto-filled the real title field ( that I put hidden ) with a stripped down version of what was in the textarea.

So basically, I use work-arounds. Just a thought.

To solve your problem for Blocks, you can always use the Bean module. That way, you can make different 'types' of Blocks, all fieldable. And then implement the method I used with the WYSIWYG.

1
  • Thanks, I have used duble pipe sign || and replaced that through javascript. Pipe signs automaticaly removed from page title. Commented Oct 22, 2013 at 21:00
1

I have found there is good reason why Drupal restricts html in titles. If you need a subtitle, it is best to create an additional field in the content type, then position it using the Display Suite module.

2
  • I agree that there must be some good reasons but still I want to know if there is a way. Does this aproach works for block titles ?? Commented Oct 10, 2013 at 18:10
  • No, I don't think Display Suite would help with blocks. But you could still create a custom view for a block and customize an additional field below the title as well.
    – Paul
    Commented Oct 10, 2013 at 20:03
-3

Try css, change title width for pages you want to have breaks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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