Avoid default bootstrap css path generated by wappler

Hi, following this topic:

In Tip 17 on Workaround 2, this line:

<link rel="stylesheet" type="text/css" href="../css/dgsitestyle.css?ver=<?php echo filemtime('../css/dgsitestyle.css'); ?>">

It’s usefull because I use it with bootstrap following this:

So, with bootstrap in this case it would be:

<link rel="stylesheet" href="../../bootstrap/5/css/bootstrap.min.css?ver=<?php echo filemtime('../../bootstrap/5/css/bootstrap.min.css'); ?>" />

It work like a charm, but unfortunatly on every save document (CTRL+S) it generate a new line without modification removin php tags, a cleaning new line. This make unusefull the above condition because in document persist the new line of bootstrap that wappler generates.
<link rel="stylesheet" href="../../bootstrap/5/css/bootstrap.min.css" />

How to prevent this from happening?

Thanks.

If you are on a PHP page this is what I do.
I place the new line inside a conditional. Example:
<?php if (1==0){?><link rel="stylesheet" href="../../bootstrap/5/css/bootstrap.min.css" /><?php }?>

This way the css is being ignored on the webpage while Wappler does not add it anymore since it finds it on the code.

Thank you

2 Likes

Great, a simple but powerful solution. Thanks.
I thinks that Wappler team sould considering an optional way to deactivate this auto function about generate bootstrap css path in file, to not incurr in aditional php tags.
Maybe with future scss compiler into wappler.