bkellogg Posted August 13, 2012 Share Posted August 13, 2012 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: HomeProjectsproject 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? Link to comment Share on other sites More sharing options...
apeisa Posted August 13, 2012 Share Posted August 13, 2012 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/ 1 Link to comment Share on other sites More sharing options...
apeisa Posted August 13, 2012 Share Posted August 13, 2012 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. 1 Link to comment Share on other sites More sharing options...
bkellogg Posted August 13, 2012 Author Share Posted August 13, 2012 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! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now