17488 Posts in 4473 Topics by 1978 members
| Go to End | ||
| Author | Topic: | 3326 Views |
-
Re: Three separate Images in the Home Page Banner -Sorry for the Cross Post

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">.
-
Re: Three separate Images in the Home Page Banner -Sorry for the Cross Post

1 May 2008 at 10:23pm
right, I see now I was unclear about the path.
Thanks again.
-
Re: Three separate Images in the Home Page Banner -Sorry for the Cross Post

4 May 2008 at 10:35pm
Hello guys,
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.
-
Re: Three separate Images in the Home Page Banner -Sorry for the Cross Post

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.
| 3326 Views | ||
| Go to Top |



