Results 1 to 2 of 2

Thread: CE default image height/width

  1. #1
    New user
    Join Date
    04-07-17.
    Posts
    1

    Frage CE default image height/width

    Its been a while since i built a site in Contao.

    Well on a new site i had to set the default image content element width height, and i was looking up how to do that in dcaconfig.php
    Turns out this documentation still is hard to find. Does it even exist?
    From what i found there is a default config in each module .. its not
    Code:
    /domains/reisburovanraak.nl/public_html/system/modules/core/dca/tl_content.php
    is it?

    Thats question 1.


    Which led me to question 2:

    Anyway, in the backend of Contao 3.5.24 i found this option on the Theme page "image sizes"..:
    option image size.png
    So i wondered "hey maybe they have a feature for that now" and descided to look into this.
    But again, no documentation. At least not on https://docs.contao.org/en/ and Google gave no results either.
    The page to add one looks like this:

    add image size.png

    And also there, no help function or text. What does it do?
    Thats question 2.

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

    Default

    Yes, of course ...dca/tl_content.php is the default configuration.

    You can modify this within your system/config/dcaconfig.php
    PHP Code:
    // Default image size - width, height, mode|size-ID
    // Mode options: proportional, box, crop, left_top, center_top, right_top, left_center, center_center, right_center, left_bottom, center_bottom, right_bottom
    $GLOBALS['TL_DCA']['tl_content']['fields']['size']['default']  = array(600400'proportional');
    // Or a default image size ID
    $GLOBALS['TL_DCA']['tl_content']['fields']['size']['default']  = array(''''42); 
    For the image sizes there only exist geman tutorials.

    First you have to learn something about the HTML picture element.
    https://www.w3schools.com/tags/tag_picture.asp
    https://developer.mozilla.org/en-US/...lement/picture
    http://w3c.github.io/html/semantics-...icture-element

    Here is a nice Contao tutorial with video
    https://contao.org/files/conference/...t-4-folien.pdf
    https://www.youtube.com/watch?v=ub8yROSQyQ4

    And here another Contao tutorial
    https://rocksolidthemes.com/de/conta...picture-contao

    Notice that you do not have to check the polyfill in the layout to make it work. That's a mistakable hint from Contao.
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

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
  •