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.

6
  • 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
    Commented Mar 18, 2012 at 4:30
  • Please try change to PHP code which this option appear when you enable php filter in Modules page.
    – punny
    Commented Mar 18, 2012 at 4:37
  • umm, do this only at great peril
    – Jimajamma
    Commented Mar 18, 2012 at 4:38
  • Oh, I just know this way is peril. Thanks Jimajamma
    – punny
    Commented Mar 18, 2012 at 4:44
  • how would i create a verabtim filter? would this be done in views?
    – huzzle
    Commented Mar 18, 2012 at 5:38

1 Answer 1

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.