Results 1 to 9 of 9

Thread: Include css

  1. #1
    User
    Join Date
    05-21-18.
    Posts
    79

    Default Include css

    Hey,

    I want to include css with this
    HTML Code:
    link rel="stylesheet" href=""
    but i want to put in href path to assets or files so mu link ned to be something like this
    HTML Code:
    link rel="stylesheet" href="assets/css/mine.css"
    if u get me.

    Thanks

  2. #2
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    299

    Default

    You should not put anything into the assets directory.

    Simply add your stylsheet within the page layout.

  3. #3
    User
    Join Date
    05-21-18.
    Posts
    79

    Default

    Quote Originally Posted by Spooky View Post
    You should not put anything into the assets directory.

    Simply add your stylsheet within the page layout.
    Can i add js in backend like css?

  4. #4
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,005

    Default

    Yes, of course. You can add everything using the page layout.
    Contao Community Moderator
    → Support options

  5. #5
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    299

    Default

    JavaScript only in Contao 4.

  6. #6
    User
    Join Date
    05-21-18.
    Posts
    79

    Default

    Quote Originally Posted by Spooky View Post
    JavaScript only in Contao 4.
    Can i somehow import .js file like .css in layout?
    .js file is large one so is there any other way or i must to put code in one line?

  7. #7
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    299

    Default

    Which Contao version are you using?

  8. #8
    User
    Join Date
    05-21-18.
    Posts
    79

    Default

    Quote Originally Posted by Spooky View Post
    Which Contao version are you using?
    version: 4.4.19

  9. #9
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    299

    Default

    Then you can simply add JavaScript files in your page layout.

    Also you should update to the most recent Contao 4.4 version.

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
  •