JuKu / JuKuCMS

Open Source CMS should be the fastest CMS world wide (WIP).
Other
5 stars 1 forks source link

Dwoo Plugin: integrate css / js files if they are not empty #197

Closed JuKu closed 5 years ago

JuKu commented 5 years ago

Dwoo Plugin: integrate css / js files if they are not empty.

Parameter: style_name, media, position

JuKu commented 5 years ago

Instead of:

{if $JS_ALL_HEADER_EMPTY != true}
    <!-- header javascript -->
    <script language="javascript" type="text/javascript" src="{$BASE_URL}/js.php?style=texturedblue&amp;hash={$JS_HASH_ALL_HEADER}&amp;position=header"></script>
    {else}
        <!-- DEBUG: header javascript was removed for optimization, because generated js script was empty -->
    {/if}

More like this:

{JS async=true style=texturedblue}<Position>{/JS}
PascalReintjens commented 5 years ago

My proposal:

{RES load="ThisParamIsOptional"}css_style{/RES}

Example style: image

JuKu commented 5 years ago

I agree with your last proposal.