Results 1 to 4 of 4

Thread: CSS ID/class issue with module inside article

  1. #1
    New user
    Join Date
    05-22-12.
    Posts
    9

    Default CSS ID/class issue with module inside article

    Hi,
    I created my own module (with custom HTML) which I'd like to use as element in an article. Inside the properties of that element (under 'Expert Setings') you can give that element a CSS ID/class. But while loading the page the CSS selector doesn't show up. I think I have to insert {{id}} or {{class}} somewhere. But the manual (https://docs.contao.org/books/manual...sert-tags.html) doesn't say anything about ID's or classes. What to do?
    Thanks, Sander

  2. #2
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    If you include a module as CE in an article, the class and id of the module will get lost. This is a known limitation. This only works, if you include the module in a layout.

    Write the class and id direct into the HTML-Code or set class and id in the CE where you include your module.
    Last edited by Andreas; 01/02/2017 at 14:32.
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

  3. #3
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Or use this extension: [mergecssclasses]

  4. #4
    New user
    Join Date
    05-22-12.
    Posts
    9

    Default

    Thanks guys!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •