0

I've created a custom block with Div and P tags in which some have id and class attributes. I've tried use FULL & Filtered html formats for the block body however the id and classes don't show up once I've added the block.

2
  • As you've noticed, The FULL and Filtered HTML filters strip out CSS styles, id's, classes, etc. from the full or filtered tags. No way around it except to either create a verbatim filter to to create the block in a module.
    – Jimajamma
    Mar 18, 2012 at 4:30
  • how would i create a verabtim filter? would this be done in views?
    – huzzle
    Mar 18, 2012 at 5:38

2 Answers 2

-2

Please try change to PHP code which this option appear when you enable php filter in Modules page.

3
  • umm, do this only at great peril
    – Jimajamma
    Mar 18, 2012 at 4:38
  • Oh, I just know this way is peril. Thanks Jimajamma
    – punny
    Mar 18, 2012 at 4:44
  • Enabled php filter on production site can cause big problems if editor of the site is not careful.
    – 15dk51
    Apr 14, 2012 at 6:56
1

In admin/structure/types/manage/your_content_type/display (drupal 7 path) make sure field Body has format "Default" selected. If you have any other format those will remove the div ids and classes from the body.

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.