本文整理汇总了PHP中CMS_Asset::add_cms_css方法的典型用法代码示例。如果您正苦于以下问题:PHP CMS_Asset::add_cms_css方法的具体用法?PHP CMS_Asset::add_cms_css怎么用?PHP CMS_Asset::add_cms_css使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMS_Asset
的用法示例。
在下文中一共展示了CMS_Asset::add_cms_css方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ucwords
$widget_name = $widget['widget_name'];
$option_tag .= '<option ' . $selected . ' value="{{ widget_name:' . $widget_name . ' }}">widget : ' . $widget_name . '</option>';
$selected = '';
}
foreach ($config_list as $config_name => $value) {
$option_tag .= '<option value="{{ ' . $config_name . ' }}">configuration : ' . $config_name . '</option>';
$selected = '';
}
// option for languages
$option_language = '';
foreach ($language_list as $language) {
$selected = $language == $current_language ? 'selected' : '';
$option_language .= '<option ' . $selected . ' value="' . $language . '">' . ucwords($language) . '</option>';
}
$asset = new CMS_Asset();
$asset->add_cms_css('grocery_crud/css/jquery_plugins/chosen/chosen.css');
$asset->add_cms_css('grocery_crud/themes/flexigrid/css/flexigrid.css');
echo $asset->compile_css();
$asset->add_cms_js("grocery_crud/js/jquery_plugins/jquery.chosen.min.js");
$asset->add_cms_js("grocery_crud/js/jquery_plugins/config/jquery.chosen.config.js");
echo $asset->compile_js();
?>
<style type="text/css">
.text-area-section{
resize: none;
white-space: nowrap;
overflow: auto;
min-width: 385px!important;
min-height: 75px!important;
margin-top: 10px!important;
font-family: Courier;
示例2:
<html lang="{{ language:language_alias }}">
<head>
<meta charset="utf-8">
<title><?php
echo $template['title'];
?>
</title>
<?php
echo $template['metadata'];
?>
<link rel="icon" href="{{ site_favicon }}">
<!-- Le styles -->
<?php
$asset = new CMS_Asset();
$asset->add_cms_css('bootstrap/css/bootstrap.min.css');
$asset->add_themes_css('style.css', '{{ used_theme }}', 'default');
echo $asset->compile_css();
?>
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="{{ site_favicon }}">
</head>
<body>
<?php
$asset->add_cms_js("bootstrap/js/bootstrap.min.js");
$asset->add_themes_js('script.js', '{{ used_theme }}', 'default');
echo $asset->compile_js();
?>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
示例3:
}
// option for languages
$option_language = '';
foreach ($language_list as $language) {
$selected = $language->code == $current_language ? 'selected' : '';
$option_language .= '<option ' . $selected . ' value="' . $language->code . '">' . $language->name . '</option>';
}
// option for layouts
$option_layout = '<option selected value="' . $config_list['site_layout'] . '">' . $config_list['site_layout'] . '</option>';
foreach ($layout_list as $layout) {
if ($layout != $config_list['site_layout']) {
$option_layout .= '<option value="' . $layout . '">' . $layout . '</option>';
}
}
$asset = new CMS_Asset();
$asset->add_cms_css('grocery_crud/css/jquery_plugins/chosen/chosen.css');
//$asset->add_cms_css('grocery_crud/themes/flexigrid/css/flexigrid.css');
echo $asset->compile_css();
?>
<style type="text/css">
.text-area-section{
resize: none;
word-wrap: no-wrap;
white-space: pre-wrap;
overflow-x: auto;
width:95%;
min-width: 385px!important;
min-height: 75px!important;
margin-top: 10px!important;
font-family: Courier;
font-size: small;