17452 Posts in 4473 Topics by 1971 members
Page: 1 2
|Go to End|
1 May 2008 at 10:15pm
ut it appears to me that you can't hard code images into the template using the <img> tag? is this true??
Of course you can. If you have saved the image in the current themes image folder you can use $ThemeDir as a shortcut even
Eg if your image is in themes/blackcandy/images/MyImage.gif
You can <img> it with
<img src="$ThemeDir/images/MyImage.gif" alt="My Awesome Image">.
1 May 2008 at 10:23pm
right, I see now I was unclear about the path.
4 May 2008 at 10:35pm
I face a similar problem - I'd like to set up 3 image links on the homepage pointing to internal pages. However, instead of making 3 link fields in the db array and 3 image fields in the has_one array, I would like to only have 3 data object fields in the has_one array - each data object consisting of the image/link fields. Is this possible ? How will the getCMSFields method look like ?
Thank you for any help.
5 May 2008 at 8:46am
One way is to use a complex table field - check out http://doc.silverstripe.com/doku.php?id=tutorial:5-dataobject-relationship-management.
Page: 1 2
|Go to Top|