LiamC

ahh okay ... trying to say if subsite class exists and it wont perform whats inside the if statement 😕

LiamC

Does anyone know how to get

  1. if(class_exists(classname)){}
working on SS4?

LiamC

Hi everyone. Is there any subsite documentation for SS4? the following I cant get to work on ss4

Files: Requires logging in to the Slack workspace to view/download
Pasted image at 2019-02-20, 2:53 PM (PNG)
LiamC

does anyone know how to make a model admin subsite specific? at the moment it only shows in "main site" not the subsites?

wmk

https://github.com/silverstripe/silverstripe-subsites/blob/master/src/Extensions/SubsiteMenuExtension.php

Show 1 attachment(s)
src/Extensions/SubsiteMenuExtension.php

<?php

namespace SilverStripe\Subsites\Extensions;

use SilverStripe\Core\Extension;

/*
 * Simple extension to show admins in the menu of subsites.
 * If an admin area should be available to a subsite, you can attach
 * this class to your admin in config. eg:
 *
 *      MyAdmin::add_extension('SubsiteMenuExtension');
 *
 * Or you can include the subsiteCMSShowInMenu function in your admin class and have it return true
 */

class SubsiteMenuExtension extends Extension
{
    public function subsiteCMSShowInMenu()
    {
        return true;
    }
}
Hide attachment content
wmk

then it shows on all subsites. If you just need it on some subsites you need your own logic according to that extension

LiamC

yeah thats what I am trying to make, is there something already existing that I can loop from the blog module or do I have to create something?

LiamC

a blog archive to show posts of sept 2018 for example

LiamC

I think silverstripe blog has the archive built in? can anyone input on this? I can see it in the code base but I'm not sure if it can generate a list?