Tagged: Override
-
AuthorPosts
-
March 2, 2016 at 4:42 pm #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 ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
March 3, 2016 at 6:28 am #893953Hi @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 ?
March 3, 2016 at 1:48 pm #894270Hi 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 ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
March 4, 2016 at 4:59 pm #894940Hi @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.
1 user says Thank You to Adam M for this useful post
-
AuthorPosts
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