Jump to content


Photo

Multisite Module + Shared Content


  • Please log in to reply
3 replies to this topic

#1 bkellogg

bkellogg

    Newbie

  • Members
  • Pip
  • 2 posts
  • 1

  • LocationOverland Park, KS

Posted 13 August 2012 - 11:16 AM

Hi,

I am attempting to use the Multisite module to share Project content across three different sites. Here's how my pages structure is set up:
  • Home
    • Projects
    • project 1
    • project 2
    • project 3
  • www.site1.com
    • Site1 Category1
    • Site1 Category2
  • www.site2.com
    • Site2 Category1
    • Site2 Category2
  • www.site3.com
    • Site3 Category1
    • Site3 Category2
In my Project template, I have a page field for Category - which allows me to select multiple Categories (and sites). When viewing each site & category, the projects show up correctly... but I'm unsure how to link to the Project detail page and stay within the current site.

Does this approach make sense? Or is there a better way of structuring my pages to get this to work?

#2 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,586 posts
  • 906

  • LocationVihti, Finland

Posted 13 August 2012 - 12:44 PM

Not totally sure what you are looking for. Your page structure looks just fine for me. If I follow you correctly you choose categories from project page, and then you want to show those projects in different domains?

Something like this should work:
  • Create a new template called "view_project"
  • Add page called "project" under each your sites and give those pages a template "view_project"
  • Allow urlSegments for your view_project template
And code that goes into your view_project template should be something like this (written in browser):
<?php
if ($input->urlSegment1) {
  $projectName = $sanitizer->pageName($input->urlSegment1);
  $project = $pages->get("parent=/projects/, name=$projectName");
  echo "<h1>$project->title</h1>";
  // Or just echo $project->render();
} else {
  echo "No project found";
}

And when linking to your projects you should use urls like these: www.site1.com/project/projectname/

#3 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,586 posts
  • 906

  • LocationVihti, Finland

Posted 13 August 2012 - 12:47 PM

Does this approach make sense? Or is there a better way of structuring my pages to get this to work?


I would probably do it other way around: I would choose projects from categories. Usually I would do otherwise, but since your projects is just a "data reporsity" and categories are on different domains that would make more sense for me). But that is just a matter of preference.

#4 bkellogg

bkellogg

    Newbie

  • Members
  • Pip
  • 2 posts
  • 1

  • LocationOverland Park, KS

Posted 13 August 2012 - 02:16 PM

I would probably do it other way around: I would choose projects from categories. Usually I would do otherwise, but since your projects is just a "data reporsity" and categories are on different domains that would make more sense for me). But that is just a matter of preference.


Thanks apeisa, this makes a lot more sense - and will also let me set the display order of projects within each category. I appreciate your help on this, as well as your work on the module!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users