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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Problem with tutorial 1 using WAMP


Go to End


3 Posts   1626 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, 5523 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