Jump to content

Как в шаблоне vamshop4 отключить объединение, минификацию, сжатие css, js?


support

Recommended Posts

support

В файлах /templates/vamshop4/javascript/script_footer.php /templates/vamshop4/css/css.php

Удаляйте все строки с bender ... и меняйте их на обычный html-код подключения css, js файлов.

для js - <script src ... </script>
и для css - <link href ...

 

Вот пример из VamShop 2:

{bender src="{base_path}/js/jquery/jquery.min.js"}
{bender src="{base_path}/js/bootstrap3/bootstrap.min.js"}
{bender src="{base_path}/js/ie10-viewport-bug-workaround.js"}
{bender src="{base_path}/js/jquery/plugins/jpushmenu/jpushmenu.js"}
{bender src="{base_path}/js/jquery/plugins/colorbox/jquery.colorbox-min.js"}
{bender src="{base_path}/js/jquery/plugins/sequence/jquery.sequence-min.js"}
{bender src="{base_path}/js/jquery/plugins/scrollup/jquery.scrollup.min.js"}
{bender src="{base_path}/js/jquery/plugins/maskedinput/jquery.maskedinput.min.js"}
{bender src="{base_path}/js/jquery/plugins/validate/jquery.validate.pack.js"}
{bender src="{base_path}/js/vamshop.js"}
{bender output="{base_path}/js/vamshop-packed.js"}

<!--[if lt IE 9]>
<script type="text/javascript" src="{base_path}/js/html5.js"></script>
<script type="text/javascript" src="{base_path}/js/respond.min.js"></script>
<![endif]-->
{bender src="{base_path}/css/bootstrap3/bootstrap.min.css"}
{bender src="{base_path}/css/font-awesome.min.css"}
{bender src="{base_path}/css/jquery/plugins/push-menu/push-menu.css"}
{bender src="{base_path}/css/jquery/plugins/colorbox/colorbox.css"}
{bender src="{base_path}/css/jquery/plugins/sequence/sequence.css"}
{bender src="{base_path}/css/vamshop.css"}
{bender output="{base_path}/css/vamshop-packed.css"}

 

на:
<script type="text/javascript" src="{base_path}/js/jquery/jquery.min.js"></script>
<script type="text/javascript" src="{base_path}/js/bootstrap3/bootstrap.min.js"></script>
<script type="text/javascript" src="{base_path}/js/ie10-viewport-bug-workaround.js"></script>
<script type="text/javascript" src="{base_path}/js/jquery/plugins/jpushmenu/jpushmenu.js"></script>
<script type="text/javascript" src="{base_path}/js/jquery/plugins/colorbox/jquery.colorbox-min.js"></script>
<script type="text/javascript" src="{base_path}/js/jquery/plugins/sequence/jquery.sequence-min.js"></script>
<script type="text/javascript" src="{base_path}/js/jquery/plugins/scrollup/jquery.scrollup.min.js"></script>
<script type="text/javascript" src="{base_path}/js/jquery/plugins/maskedinput/jquery.maskedinput.min.js"></script>
<script type="text/javascript" src="{base_path}/js/jquery/plugins/validate/jquery.validate.pack.js"></script>
<script type="text/javascript" src="{base_path}/js/vamshop.js"></script>
<!--[if lt IE 9]>
<script type="text/javascript" src="{base_path}/js/html5.js"></script>
<script type="text/javascript" src="{base_path}/js/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="{base_path}/css/bootstrap3/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="{base_path}/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="{base_path}/css/jquery/plugins/push-menu/push-menu.css" />
<link rel="stylesheet" type="text/css" href="{base_path}/css/jquery/plugins/colorbox/colorbox.css" />
<link rel="stylesheet" type="text/css" href="{base_path}/css/jquery/plugins/sequence/sequence.css" />
<link rel="stylesheet" type="text/css" href="{base_path}/css/vamshop.css" />

Здесь примерно так же всё делается, только список файлов чуть отличается.

Link to post
Share on other sites
×
×
  • Create New...