3212 Posts in 847 Topics by 809 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 925 Views |
-
problem with menu in tutorial 1

5 January 2009 at 7:42am
Hi
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 Page.ss looks like :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" >
<head>
<% base_tag %>
$MetaTags
<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" />
</head>
<body>
<div id="Main">
<ul id="Menu1">
<% control Menu(1) %>
<li><a href="#">$MenuTitle</a></li>
<% end_control %>
</ul>
<div id="Header">
<h1>$Title</h1>
</div>
<div id="ContentContainer">
<div id="Content" class="typography">
$Content
$Form
</div>
</div>
<div id="Footer">
<span>Visit <a href="http://www.silverstripe.com" title="Visit www.silverstripe.com">www.silverstripe.com</a> to download the CMS</span>
</div>
</div>
$SilverStripeNavigator
</body>
</html>Thanks for help.
One suggestion maybe there should be a tutorial section in the forum
S
-
Re: problem with menu in tutorial 1

5 January 2009 at 8:40am
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() {
parent::init();
Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("form");
}
}try them first and if it still doesn't work then we can look a bit deeper
-
Re: problem with menu in tutorial 1

5 January 2009 at 9:30pm
Hi
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
T
-
Re: problem with menu in tutorial 1

6 January 2009 at 2:07am Last edited: 6 January 2009 2:13am
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?
-
Re: problem with menu in tutorial 1

6 January 2009 at 3:30am
Hi
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
T
| 925 Views | ||
|
Page:
1
|
Go to Top |


