Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions

problem with menu in tutorial 1


5 Posts   1096 Views


5 January 2009 at 7:42am Community Member, 211 Posts


I'm trying to learn to use thi cms so I started with tuto 1 ;)

I installed evrything fine and idi the first step ok.

Now I'm stuck with the menu 1 step, Tough I followed expalnation it doesnt appear (I did flush and get the database & template list ok) this is how my looks like :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns="" xml:lang="en" >
      <% base_tag %>
      <link rel="stylesheet" type="text/css" href="tutorial/css/layout.css" />
      <link rel="stylesheet" type="text/css" href="tutorial/css/typography.css" />
      <link rel="stylesheet" type="text/css" href="tutorial/css/form.css" />
      <div id="Main">
      <ul id="Menu1">
<% control Menu(1) %>
<li><a href="#">$MenuTitle</a></li>
<% end_control %>
         <div id="Header">
         <div id="ContentContainer">
            <div id="Content" class="typography">
         <div id="Footer">
            <span>Visit <a href="" title="Visit"></a> to download the CMS</span>

Thanks for help.

One suggestion maybe there should be a tutorial section in the forum


Carbon Crayon

5 January 2009 at 8:40am Community Member, 598 Posts

Hi Servalman, Welcome to silverstripe :)

Try removing the <?xml version="1.0" encoding="UTF-8"?> at the top of the page, I know it has caused me problems before. Also you should remove the <link> tags and place them in your Page_Controller class by adding them the init() function like this

class Page_Controller extends ContentController {
   function init() {

try them first and if it still doesn't work then we can look a bit deeper :)


5 January 2009 at 9:30pm Community Member, 211 Posts


Removing the XML déclaration on top of document worked ok.
I did not try to put the <link> tags in the controler page because I did not complete the second tutorial
wich deals with more advanced notions, but I will try to smoe point for sure.

One more question if I remove the XML declaration on top of page, I'm right to think that it is not an xml doc anymore wich can be a problem for me ?

But thanks again I will move on with the tuto


Carbon Crayon

6 January 2009 at 2:07am (Last edited: 6 January 2009 2:13am), Community Member, 598 Posts

hmm, having read some stuff I still cant seem to find a definite answer, but my instinct tells me the browser would have trouble reading an XML document without it.

I always remove this line as it sends IE6 into quirks mode which causes CSS problems and I have never used true XML in a site so I'm not really the best person to ask.

Anyone else know more about this?


6 January 2009 at 3:30am Community Member, 211 Posts


Strange thing as I tried to use the XML déclaration
it is now working maybe the flush did not work fine last time.

I'll keep posted if it happens again