SilverStripe图像在前端不可见!只有登录的用户才能看到这些图像

时间:2017-12-27 10:07:26

标签: silverstripe

银色条纹图像未在前端显示,只有在我们登录时才能看到图像

在仪表板中,它必须使用文件权限选项来形成任何人,但仍然存在相同的问题。

任何帮助都会得到满足!

谢谢!

1 个答案:

答案 0 :(得分:0)

似乎图像需要单独发布它们所引起的页面。如果你添加$ owns,那么当你发布页面本身时,它会导致图像更新/发布,我认为默认情况下它应该是这样。

private static $has_one = [
    'TeaserImage'=>Image::Class
    //This is my image for the page.
];
private static $owns = [
    'TeaserImage'
    //Adding this will make sure the image is published with the page.
];