I've just realized that some of my pages have a long DOCTYPE, but most pages have the short DOCTYPE like below. I never add this details myself and in all my Master Pages, I don't see/add the DOCTYPE details. My question is how the DOCTYPE got added and how to make all pages use the same short DOCTYPE. I believe the long DOCTYPE may be the cause to mess up some of my navigation for mobile. Thanks for your input!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<!DOCTYPE html>
<html >
The DOCTYPE is set in the main portal template when using the PortalEngine in Kentico with the code <%=DocType%>. This value comes from the Master page tab inside the Pages application. You can see an example of this on the Creating the master page tutorial in the Kentico documentation.
It's the first field on the tab that you can edit, so you should just be able to set the value to <!DOCTYPE html>.
As far as I am aware, each page that has a master page can specify its own document type, so check out each of your master pages. I think if you check out the link about, this will help you out.
It's also worth checking that no-one has edited the file CMSPages\PortalTemplate.aspx (this is the base for PortalEngine pages). For reference, the beginning of the file normally looks as follows (in Kentico 10):
<%# Page Language="C#" AutoEventWireup="true" Inherits="CMSPages_PortalTemplate"
ValidateRequest="false" MaintainScrollPositionOnPostback="true" EnableEventValidation="false"
Codebehind="PortalTemplate.aspx.cs" %>
<%=DocType%>
<html <%=XHtmlNameSpace%> <%=XmlNamespace%>>
To add to what Matt has said, if your not using Portal method then the changes could be in several different aspx files in the CMSTemplates directory. These templates would have that namespace defined in them if they were a master page template.
<!DOCTYPE html>
add above doctype in very first line of your master page.
refer below link.
https://docs.kentico.com/k9tutorial/creating-the-master-page
hopes it will help
Related
I'm migrating old sites to Express/Jade having the "HTML 4.01 Strict" doctype. I want to keep this doctype for now.
How do I get this doctype in Express/Jade?
"doctype strict" only provides the XML type, not HTML.
Of course I can type the doctype manually, but this doesn't work because Jade will insert an extra "/" at the end of each HTML element in the rest of the document (as if the document was XML), which leads to validation errors.
doctype strict
Will give you:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
I believe that is the closest you could get.
P.S.: If you're migrating, why not change, since you have to touch it anyway?
Doctype only get IE out of quirks mode. Otherwise, they are basically ignored by browsers. Only a xhtml doctype is different as it could be parsed as XML with different parser. But from the browser stand point, as long as you have a doctype (no mather which one), it'll work.
Although, in Jade, you can:
# doctype <anything>
doctype HTML 4.01 Strict
I am new to angularjs, and was trying to create a sample angularjs in a Facelets file. But I am getting an error in the line <html ng-app> in Eclipse IDE. The error specifies that the ng-app attribute should be followed by an = character. Is it not possible to include angularjs code in a Facelets XHTML file?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:ng="http://angularjs.org" ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</head>
<body>
<div>
<label>Name:</label>
<input type="text" ng-model="yourName" placeholder="Enter a name here">
<hr>
<h1>Hello {{yourName}}!</h1>
</div>
</body>
</html>
Take a look at following:
Try angular faces: https://github.com/stephanrauh/AngularFaces
And there is also a project: https://github.com/pankajtandon/PointyPatient
Prime faces refer to: http://angularprime.appspot.com/#/main
The best way is to go with HTML & JS as Client, and JAX-RS on Server Side.
I had similar problems, with Primefaces and Bootstrap, and became convinced, that JS & HTML at the moment is better for client side development.
Give the attribute the ng-app.
The value of the attribute would be the same as the name of variable that contains the return value of angular.module().
for ex:
ng-app="SampleApp"
in the html page
var SampleApp = angular.module("SampleApp", ["ngResource"]).
config(
//your code
);
in the app.js file
I think this should work for you.
The logic is that, when you define the ng-app it gives the reference to the particular module of app.js that would call the relevant controllers.
There is an app.js file in angularjs. This contains all the controllers define. These controllers act as connecters and data pipeliners between the html(our view) and the .cs(mvc controller) files.
These controllers are defined in a module (as i have defined one in the above answer).
There can be numerous modules in app.js. and hence they wil have numerous controllers.
ng-app is a directive that contains the name of the module you want to use as attribute.
ng-app defined will be active till the closing tag of the tag defined. That means if you have defined ng-app in html tag, it will work till the html tag closes, if in a div, it will work for that division.
If you dont get anything, google it, or refer the angularjs documentation, or shoot me a question.!!
I hope you got something out of it.:-)
Stumbled on this while searching myself.
XHTML does not allow an attribute without a value. While you can ignore this in Eclipse, the latest JSF libraries blow up and you'll get an exception.
Specify a value, which corresponds to your module name. For example, if you initialize your angular module with:
var myAppModule = angular.module('myApp', []);
Then you need to specify:
<html ng-app="myApp">
And all should be good minus some warnings in eclipse for not recognizing "ng-app". Works for me. Also, you probably want the HTML 5 doc type instead of the strict you have. Try:
<!DOCTYPE html>
<html ng-app="myApp">
I am not sure if this is possible.
This is the name of the site:
www.mysite.com
and I created an html (named index.html) & saved it to the folder myfile which is a redirect to this site www.mysite.com/myfile
Now on the site, I have a content here that if you click on it, it will direct you to this:
www.mysite.com/documentation
Now the redirect html I made, I would like it to be redirected to the documentation
so that if you click on www.mysite.com/myfile - it will open the www.mysite.com/documentation but this documentation is not an html its inside the cms.
Is that possible?
Btw here is the html code I saved in the index.html. Do I have to insert the url here:
www.mysite.com/documentation?
CONSTRUCTION PAGE
Is this what you need?
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.mysite.com/documentation">
I have trouble understanding your question correctly. So I am unsure if this will help you.
Edit for valid html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Redirect</title>
<meta http-equiv="REFRESH" content="0; url=http://www.mysite.com/documentation" />
</head>
<body>
</body>
</html>
Use document type weblink on modx
As Gus suggested, use a weblink.
Create a new weblink with alias myfile, and the content should be a link to www.mysite.com/documentation.
Then if you visit www.mysite.com/myfile it will take you directly to www.mysite.com/documentation.
For more info: http://rtfm.modx.com/display/revolution20/Weblink
As the others have already said, a weblink in modX would be the way to go.
I answered this already in more detail in your other question with essentially the same topic.
I'm working on a thumbnailer whereby a service takes thumbnail images of HTML content in a form-less IE9 control. Everything is working smoothly with a DrawToBitmap call along with a couple of GDI calls, but SVG content is not displaying. Everything else seems to display just fine, but no SVG.
I figure that this has something to do with how SVG is implemented in IE, but I don't know the details. Any thoughts?
TIA.
The answer came from Ted Johnson of IEBlog:
IE9 has no separate SVG engine; it’s all one DOM and rendering
pipeline. However, if your document isn’t in 9 standards document
mode, you’ll not get any SVG content. I think, by default, the
WebBrowser control in .NET defaults to compatibility mode. Try adding
a meta tag to the top of your HTML page to force IE9 mode:
<meta http-equiv="X-UA-Compatible" content="IE=9">
This, indeed, turned on SVG rendering like a light switch.
You can also set a doctype of HTML4 strict or HTML5.
<!DOCTYPE HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
From http://www.seowarp.com/blog/2011/06/svg-scaling-problems-in-ie9-and-other-browsers/ :
Before I begin, I’d just like to point out that on my test page, Internet Explorer 9 refused to display any of my SVG images on a basic HTML page until I declared the HTML4 strict or HTML5 doctypes.
I am new to Drupal and I need to add an attribute to the HTML tag, but I cannot find the way. Thank you for the help.
This probably depends in part on your theming mechanism. However, the doctype and html tags are likely hard-coded in page.tpl.php or similar (located in sites/all/themes/themename). The exact file will depend on your theme.
For example, I have a site with the following in page.tpl.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>">
As you can see, there is some information being injected by PHP. This would be the place for you to make your change.