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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Problem with tutorial 1 using WAMP


Reply


3 Posts   1109 Views

Avatar
mweichert

Community Member, 2 Posts

27 February 2009 at 11:32am

Edited: 27/02/2009 11:32am

Hello,

I rarely use Windows, but I'm stuck at my mother's right now because of the weather. I thought I'd make use of my time and learn more about Silverstripe.

I'm having fun so far, but just thought I'd paste a problem I encountered with the tutorial. This could be related to WAMP-only, I'm not sure.

Instead of being able to use:

<div id="Banner">
<img src="tutorial/images/welcome.png" alt="Homepage image" >
</div>

I had to use:

<div id="Banner">
<img src="themes/tutorial/images/welcome.png" alt="Homepage image" >
</div>

I've encountered no other problems. I'm assuming this is a rewrite rule that's failing?

Thanks for your help,
Mike

Avatar
Willr

Forum Moderator, 5513 Posts

27 February 2009 at 2:42pm

Sorry looks like I missed that. We changed the paths in ss 2.3 so we had to go through all the tutorials and change them. I'll fix it now

Avatar
emotimo

Community Member, 1 Post

4 August 2009 at 1:01pm

I just encountered the same problem but couldn't find this post until I'd figured out the solution and got a search string that worked! It looks as though the tutorial (http://doc.silverstripe.com/doku.php?id=tutorial:1-building-a-basic-site&s=welcome%20png#using_a_subtemplate) hasn't been updated. (as of 4 August 2009)

You need to update the block
____________
themes/tutorial/templates/Layout/HomePage.ss

<div id="Banner">
<img src="tutorial/images/welcome.png" alt="Homepage image" />
</div>
<div id="Content" class="typography">
$Content
</div>

We can then delete themes/tutorial/templates/HomePage.ss, as it is no longer needed. Replace the code we just copied out of themes/tutorial/templates/Page.ss with $Layout, so it looks like this:
_____________

To include "themes/" in the image source path.

I'm using MAMP with a local install on a MacBook Pro. Great product :-) I'm looking at updating my site.

M
Wellington NZ