From: Torsten F. <to...@fa...> - 2013-08-27 20:59:03
|
Hi, Am 27.08.2013 15:33, schrieb Marc Laporte: > ... > Areas / workspaces / perspectives: domain name doesn't change when I > switch perspectives > http://dev.tiki.org/item4696 > --- General: => Please mind, that changing a perspective in one browser session (all tabs and windows) will switch all perspectives in all other tabs and windows at the next pageload! => This can only be avoided by using a subdomain for the perspective! --- I) Setting Multidomain tiki-admin.php?page=general second tab 'General Settings' Multi-domain Configuration: One domain per line. Comma separated with perspective ID. Ex.: tiki.org,1 suite.tiki.org,2 example.domain.com,7 ... => Domain has it's own perspective, meaning, (if all caches cleared) by default you land in the above specified domain-specific perspective, when using a link to the subdomain. => Changing the perspective does NOT switch the domain => all content is NOT limited to a domain <=> all content is visble in all perspectives, respectively with all subdomains => Mind, that "category jail" is only for limiting search results --- II) Limiting Content to perspectives (Areas) create a category tree with one specific category for each perspective which should be limited activate "categories" in templates setup a custom module applying to the "#pagetop" module area with the following code: {if isset($objectCategoryIds) and in_array(1, $objectCategoryIds)} {wiki}{literal}{REDIRECT(perspective=1) /}{/literal}{/wiki} {elseif isset($objectCategoryIds) and in_array(80, $objectCategoryIds)} {wiki}{literal}{REDIRECT(perspective=2) /}{/literal}{/wiki} {elseif isset($objectCategoryIds) and in_array(119, $objectCategoryIds)} {wiki}{literal}{REDIRECT(perspective=7) /}{/literal}{/wiki} {/if} Categorise all content objects, which should be limited to a perspective and thus NOT be visible in ANY OTHER perspective. Ids need not to follow one by one, but SHOULD have the same top-category (one category tree for this purpose). For quick demonstration apply a different theme-option and different site-title for each perspective. ... Here in the example the category Ids 1,80,119 are used with the perspective Ids 1,2,7. => That means there are more different categories and perspectives used for different purposes. The content which is NOT categorised with 1, 80 or 119 is still visible in all perspectives, including 1, 2 and 7 => Switching from content of one limited category toi another limited category switches the perspective => Switching the perspective does NOT switch the domain. --- III) one way of auto-Switching Domains For each domain use a home page and a landing page. Home page is functional (kind of a system page) and auto redirects to the landingpage by using the Reirect plugin and an absolute link: {REDIRECT(url=http://sub.domain.com) /} ... => This means change to the set home page of that perspective, but always in the appropriate domain/subdomain. => Still possible: links to specific content written to the wrong domain still guide users to the right content in the right perspective (menus, theme, etc.) but in the wrong domain. --- IV) Alternatives to II: An Areas feature has been developed, based on the category jail, but it has been turning out as a dead end. Then replaced by the custom module method. to III: Alternative to the Redirect might be a RewriteRule, provided it would be possible to do such rules based on categories (maybe smarty?) --- I hope that helps, Cheers Torsten |