test

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • manny2003 Friend
    #893556

    I don’t know if it is me or if this could be a bug, but I tried to override a LESS file creating the same filename inside the local folder in the template folder (in my case off-canvas.less)
    It is correctly loaded but the problem is that the local less file is loaded before the default so it is not correctly prioritized.

    I needed to hack the t3includescoreless.php file adding this after line 149:

    $local = array();
            foreach($output_files as $k=>$v) {
                if(preg_match("/\b\.local\.\b/i", $v)) {
                    $local[$k] = $v;
                }
            }
            foreach($local as $k=>$v) {
                if(preg_match("/\b\.local\.\b/i", $v)) {
                    unset($output_files[$k]);
                    $output_files[] = $v;
                }
            }

    Am I missing something?
    Many Thanks!

    Adam M Moderator
    #893953

    Hi @manny2003,

    If you’re working with LESS files, you must have Development Mode enabled and in that case, the file will be placed in folder t3-assets. So it’s not possible that the system will load 2 Less files at once. Could you please be more specific so I can assist you better ?

    manny2003 Friend
    #894270

    Hi Adam,
    thank you for your time!

    I am using the t3_bs3_blank template. Among its less files it has an off-canvas.less:

    ts_bs3_blank--
         less--
             off-canvas.less (core)
         local--
             less--
                  off-canvas.less (override)

    I need to make modifications to this style set so I have created the off-canvas.less file inside the local folder as an override.

    The T3 framework correctly see my custom less file and load it (core/less.php sees it since T3_LOCAL_DISABLED is false and the getAllPath method of the T3Path class resolve both the locations of the less files, then less.php parses and generates two files inside t3-assets/dev/, templates.ts_bs3_blank.less.off-canvas.less.css and templates.ts_bs3_blank.local.less.off-canvas.less.css)

    So far so good, but the problem is that the two css have the wrong order, so the wrong priority since the core one is loaded after the local one, avoiding the custom modifications.

    Devevelopment Mode is activated.

    Thank you again.

    Adam M Moderator
    #894940

    Hi @manny2003,

    Many thanks for such detailed clarification, I raised a bug report here so our development team can check this matter. Please stay tuned and I will let you know when the update is available.

    Best regards,

    Adam.

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 3 replies, has 2 voices, and was last updated by  Adam M 8 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum