I am trying to use :-
- CGHeadMaster
{cgjs_render}
{cms_jquery}
{share_data}
My sites all use Bootstrap so I need to adhere to this (http://getbootstrap.com/getting-started/) in terms of the order of Meta tags:-
Code: Select all
<!DOCTYPE html>
<__html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->So far, my head looks like this ( although some of it IS NOT working )
Code: Select all
{strip}
{content assign="capturedcontent"}
{$theme_path = "{uploads_url}/cp/"}
{cms_selflink dir='previous' assign='prev_page'}
{cms_selflink dir='next' assign='next_page'}
{share_data scope=global vars='theme_path,capturedcontent,prev_page,next_page,year' }
{process_pagedata}
{/strip}
<!DOCTYPE html>
<__html lang="en">
<head>
{cghm_set key='description' val="{$capturedcontent|strip_tags|truncate:155:"...":false}" }
{if isset($workpage)}
{cghm_config_set key='title' val="{$year}" }
{else if $page_alias == "home"}
{cghm_config_set key='title' val="{sitename} - {global_content name='strap'}" }
{/if}
{metadata}
{cgjs_require cssurl='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'}
{cgjs_require cssurl='https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css'}
<link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Karla:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
{cgjs_render}
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<__script__ src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></__script>
<__script__ src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></__script>
<![endif]-->
{cms_stylesheet}
{cms_selflink dir='start' rellink=1}
{cms_selflink dir='prev' rellink=1}
{cms_selflink dir='next' rellink=1}
{cms_jquery cdn='true' exclude='nestedSortable,json,migrate,jquery-ui' append='//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js,/dev/uploads/cp/js/owl.carousel.min.js,/dev/uploads/cp/js/jquery.themepunch.tools.min.js,/dev/uploads/cp/js/plugins.js,/dev/uploads/cp/js/scripts.js' }
</head>Code: Select all
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{cghm_render}I cannot see a way to include the fonts other tahn how I am already doing it.
Ideally, I'd like to minify all css and js
Also the <Title> tag generation part {cghm_config_set key='title' val="{$year}" } is not working. I can't seem to access the value of $year.
How can I do this better ? / Make it work.
Any help greatly appreciated



