21309 Posts in 5738 Topics by 2603 members
General Questions
SilverStripe Forums » General Questions » Can't see Einstein photo from tutorial 2 but in CMS it is there
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 457 Views |
-
Can't see Einstein photo from tutorial 2 but in CMS it is there

29 March 2010 at 1:35am
I followed tutorial 2 and uploaded a photo of Einstein but I can't see it on the public site. The DIV is just empty <div class="staffphoto"></div>
In CMS view I can see it (in the article and in the asset folder).The only change I made is to rename photo to Foto.
In StaffPage.ss
$Foto.SetWidth(150)In StaffPage.php
static $has_one = array(
'Foto' => 'Image'
);
… and
$fields->addFieldToTab("Root.Content.Bilder", new ImageField('Foto'));I flushed the pages more than once, but no image. Neither in the staff holder page nor in the staff page.
-
Re: Can't see Einstein photo from tutorial 2 but in CMS it is there

29 March 2010 at 2:01am
I got it. After a look in the DB I saw that the relation to the photo wasn't in the live version. I saved and published the page and it gets displayed.
I thought uploading the picture is sufficient and didn't know to publish the article again.
| 457 Views | ||
|
Page:
1
|
Go to Top |

