Add custom CSS to the CMS
LeftAndMain:
extra_requirements_css:
- app/code/css/custom.css
Add custom CSS to the CMS
LeftAndMain:
extra_requirements_css:
- app/code/css/custom.css
<?php | |
SS_Report::add_excluded_reports( | |
array( | |
'SideReport_BrokenRedirectorPages', | |
'SideReport_BrokenVirtualPages', | |
'SideReport_BrokenFiles', | |
'CwpStatsReport', | |
'SideReport_BrokenLinks', | |
'BrokenLinksReport', |
<?php | |
//Set CMS style based on environment type | |
if (Director::isDev()) {$sitemodeCSS = 'app/css/sitemode-dev.css';} | |
if (Director::isTest()) {$sitemodeCSS = 'app/css/sitemode-test.css';} | |
if (Director::isLive()) {$sitemodeCSS = 'app/css/sitemode-live.css';} | |
Config::inst()->update('LeftAndMain', 'extra_requirements_css', [ | |
$sitemodeCSS | |
]); |
<? | |
$htmlEditorConfig = HtmlEditorConfig::get('cms'); | |
// Add half' and 'third' wrappers to tinyMCE (will appear in styles drop-down). | |
$htmlEditorConfig->setOption('style_formats', [ | |
[ | |
'title' => 'Half (md)', | |
'block' => 'div', | |
'wrapper' => true, |
#TinyMCE style toggle button
First of all, you need to define a custom format:
formats: {
custom_format: {inline: 'span', attributes: {class: 'some_css_class'}}
}
Then you'll have to add a button to your toolbar:
#TinyMCE hotkeys
Add 'format' to initalization:
formats: {text_center: {selector: 'p,h1,h2,h3,h4,h5,table', classes: 'text-center'}}
Then add the shortcut in 'setup':
setup: function (ed) {
#!/bin/sh | |
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \.php` | |
# Determine if a file list is passed | |
if [ "$#" -eq 1 ] | |
then | |
oIFS=$IFS | |
IFS=' |
SELECT table_name, table_rows | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE TABLE_SCHEMA = 'db_name' | |
ORDER BY table_rows desc; |