Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Doctype for version 3.1
#1
Hello,

I am unsure what a correct doctype is foe a version 3.1 template. If I use this in the head:

---------------------------------------------------------------------------------------

<?php if(!defined('IN_GS')){ die('you cannot load this page directly.'); }
/****************************************************
*
* @File: tempate.php
* @Package: GetSimple
* @Action: eziStart theme
*
*****************************************************/
?>

<!DOCTYPE html>
<html lang="en" >
<head>
<link href='http://fonts.googleapis.com/css?family=PT+Serif' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="<?php get_theme_url(); ?>/style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php get_page_clean_title(); ?></title>
<?php get_header(); ?>
</head>

<body>

----------------------------------------------------------------------------

There is no syntax highlighting in the editor, which suggests there is a problem somewhere. If I remove the lines associated with the doctype the syntax highlighting re-appears. That is why I thought I might have a problem with the doctype statement.

The innovation theme uses:

<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" > <!--<![endif]-->

If I use that the syntax highlighting is OK, but it seems rather complicated.

Can anyone shed any light on what the correct approach is here?

Thank you, Michael.
Reply
#2
tosd Wrote:*****************************************************/
?>

<!DOCTYPE html>

In one of my themes I got bugs in the css because of the space between the end of the php code and the doctype.

try without the double linebreak:
Code:
<?php if(!defined('IN_GS')){ die('you cannot load this page directly.'); }
/****************************************************
*
* @File:             tempate.php
* @Package:        GetSimple
* @Action:        eziStart theme
*
*****************************************************/
?><!DOCTYPE html>
Reply
#3
Thanks for the suggestion. I tried that but no luck Sad

It seems to be a very curious issue.

In thinking about it I suppose I actually have two queries:
  • Why is syntax highlighting disabled when I have a simple doctype statement in place
  • What doctype should we be using for v3.1

Any suggestions very welcome!

Michael.
Reply
#4
tosd Wrote:Thanks for the suggestion. I tried that but no luck Sad

It seems to be a very curious issue.

In thinking about it I suppose I actually have two queries:
  • Why is syntax highlighting disabled when I have a simple doctype statement in place
  • What doctype should we be using for v3.1

Any suggestions very welcome!

Michael.

I don't imagine the doctype would matter for v3.1 as a whole.
<!DOCTYPE html> is going to be the new standard though.
Reply
#5
GS 3.1 syntax highlighting doesn't work as expected. Only does it ok with css files. This will hopefully be fixed in a next release.

So ignore the colors you see when editing php/js files, or install the Theme Highlighter plugin.
Reply
#6
Thanks for the info Carlos.

Michael.
Reply




Users browsing this thread: 1 Guest(s)