Jump to:

10848 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Subsites module - Single content location

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2154 Views
  • freefall
    Avatar
    Community Member
    5 Posts

    Subsites module - Single content location Link to this post

    Hey everyone,

    Have just installed the Subsites module, and I can see that you can create different sub sites. however is there any way to share content between sites, so I only need to create some content in one of the sites, and publish to a seperate site?

    Cheers,
    Freefall

  • Chucky2k
    Avatar
    Community Member
    32 Posts

    Re: Subsites module - Single content location Link to this post

    Hi Freefall,

    The subsites module creates a Subsites Virtual Page. You can use that to select which subsites page you want to have duplicated on the site you are viewing.

    Cheers
    David

  • ulysses
    Avatar
    Community Member
    57 Posts

    Re: Subsites module - Single content location Link to this post

    Hi David,

    I have also installed subsites and all appear to work OK after going through a very hoops to understand the intricacies of the setup. All is good now.

    The only problem I am havingis that when I create the subsite Virtual page, when I try to select the site tree, instead of the tree getting displayed, I get a Fatal error. See attached image.

    Can you help? I have reported this as a bug but not received any responses to it.

    Cheers

    Ulysses

  • wmk
    Avatar
    Community Member
    44 Posts

    Re: Subsites module - Single content location Link to this post

    Hi ulysses,

    that's because subsites/code/SubsitesTreeDropdownField.php::gettree() should call parent::gettree($request) instead parent::tree($request).

    If you change about line 30 like following, it works:

       function gettree(SS_HTTPRequest $request) {
          $oldSubsiteID = Session::get('SubsiteID');
          Session::set('SubsiteID', $this->subsiteID);

          $results = parent::gettree($request);

          Session::set('SubsiteID', $oldSubsiteID);

          return $results;
       }

    HTH,

    wmk

  • ulysses
    Avatar
    Community Member
    57 Posts

    Re: Subsites module - Single content location Link to this post

    Thanks WMK. Your solution solved the problem. You help is most appreciated.

    Ulysses

    2154 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.