SlideShare una empresa de Scribd logo
cultact.subsite
Guido Stevens
guido.stevens@cosent.nl
www.cosent.nl
Social Knowledge Technology
Sharing Content between subsites
Twin Sites
Shared Content
URL rewrites
# shared user folders
rewrite ^/profielen/$ /profielen permanent;
rewrite ^/profielen(.*) /VirtualHostBase/http/$server_name:80/ka/VirtualHostRoot/profielen$1 last;
# livesearch all content
rewrite ^/livesearch(.*) /VirtualHostBase/http/$server_name:80/ka/VirtualHostRoot/livesearch$1 last;
# serve subsite
rewrite ^/(.*) /VirtualHostBase/http/$server_name:80/ka/maastricht/VirtualHostRoot/$1 last;
cultact.subsite
● request marking
● content containers
● assignment behavior
● catalog & collections
● canonical URL SEO
Request Marking
● Inspired by plone.theme
● before_traverse hook maps request SERVERNAME to subsite
● request.set('in_subsite', chosen)
● Marks request with subsite-specific browser layer
So?
● body class=”subsite_maastricht” CSS and Diazo rules
● Full custom theme registered for subsite layer possible
<drop css:theme=".only-subsite-maastricht"
css:if-not-content="body.subsite-maastricht" />
Content Containers
● dexterity.container
● Inspired by Lineage
● INavigationRoot
● ISite
● Very little content here
– subsite-local advertisements
– subsite-local contact info
Assignment Behavior
● Dexterity behavior to map shared content to subsites
● subsite_home
– “main” subsite
– single choice
● subsite_syndication
– “default visible in” subsites
– multi choice
● Used to power browser query logic
– default: request.in_subsite in context.subsite_syndication
– other: request.in_subsite != context.subsite_home
Catalog & Collections
● Catalog indexes
– subsite_home
– subsite_syndication
● Collection criteria
– subsite_home
– subsite_syndication
● MultisiteCollection behavior
– override Collection to not force INavigationRoot path query
Misc Overrides
● override plone.app.layout.links.viewlets.CanonicalURL
– point to “home” subsite virtual URL for shared content
● override Products.Doormat viewlet
– show correct footer on shared content
– uses request marker to retrieve “right” Doormat
● Need to override search in your own custom code
Sharing Content between subsites

Más contenido relacionado

Similar a Share content across subsites in Plone: cultact.subsite

Chandra Prakash Thapa: Make a WordPress Multisite in 20 mins
Chandra Prakash Thapa: Make a WordPress Multisite in 20 minsChandra Prakash Thapa: Make a WordPress Multisite in 20 mins
Chandra Prakash Thapa: Make a WordPress Multisite in 20 mins
wpnepal
 
Worcamp2012 make a wordpress multisite in 20mins
Worcamp2012 make a wordpress multisite in 20minsWorcamp2012 make a wordpress multisite in 20mins
Worcamp2012 make a wordpress multisite in 20mins
Chandra Prakash Thapa
 
Trials and Tribulations of Managed Metadata
Trials and Tribulations of Managed MetadataTrials and Tribulations of Managed Metadata
Trials and Tribulations of Managed Metadata
Scott Hoag
 
05 status-codes
05 status-codes05 status-codes
05 status-codes
snopteck
 
Archiving in eZ Publish: What to do with all your content
Archiving in eZ Publish: What to do with all your contentArchiving in eZ Publish: What to do with all your content
Archiving in eZ Publish: What to do with all your content
Peter Keung
 

Similar a Share content across subsites in Plone: cultact.subsite (20)

Chandra Prakash Thapa: Make a WordPress Multisite in 20 mins
Chandra Prakash Thapa: Make a WordPress Multisite in 20 minsChandra Prakash Thapa: Make a WordPress Multisite in 20 mins
Chandra Prakash Thapa: Make a WordPress Multisite in 20 mins
 
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache Sling
 
Modeling Tricks My Relational Database Never Taught Me
Modeling Tricks My Relational Database Never Taught MeModeling Tricks My Relational Database Never Taught Me
Modeling Tricks My Relational Database Never Taught Me
 
Worcamp2012 make a wordpress multisite in 20mins
Worcamp2012 make a wordpress multisite in 20minsWorcamp2012 make a wordpress multisite in 20mins
Worcamp2012 make a wordpress multisite in 20mins
 
Sinatra
SinatraSinatra
Sinatra
 
Documentation with sphinx @ PyHug
Documentation with sphinx @ PyHugDocumentation with sphinx @ PyHug
Documentation with sphinx @ PyHug
 
Thijs Feryn - Leverage HTTP to deliver cacheable websites - Codemotion Berlin...
Thijs Feryn - Leverage HTTP to deliver cacheable websites - Codemotion Berlin...Thijs Feryn - Leverage HTTP to deliver cacheable websites - Codemotion Berlin...
Thijs Feryn - Leverage HTTP to deliver cacheable websites - Codemotion Berlin...
 
Thijs Feryn - Leverage HTTP to deliver cacheable websites - Codemotion Berlin...
Thijs Feryn - Leverage HTTP to deliver cacheable websites - Codemotion Berlin...Thijs Feryn - Leverage HTTP to deliver cacheable websites - Codemotion Berlin...
Thijs Feryn - Leverage HTTP to deliver cacheable websites - Codemotion Berlin...
 
SPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuerySPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuery
 
Trials and Tribulations of Managed Metadata
Trials and Tribulations of Managed MetadataTrials and Tribulations of Managed Metadata
Trials and Tribulations of Managed Metadata
 
05 status-codes
05 status-codes05 status-codes
05 status-codes
 
Doctrine for NoSQL
Doctrine for NoSQLDoctrine for NoSQL
Doctrine for NoSQL
 
Doctrine and NoSQL
Doctrine and NoSQLDoctrine and NoSQL
Doctrine and NoSQL
 
Archiving in eZ Publish: What to do with all your content
Archiving in eZ Publish: What to do with all your contentArchiving in eZ Publish: What to do with all your content
Archiving in eZ Publish: What to do with all your content
 
CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009
 
Intro to sbt-web
Intro to sbt-webIntro to sbt-web
Intro to sbt-web
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2
 
Developing Branding Solutions for 2013
Developing Branding Solutions for 2013Developing Branding Solutions for 2013
Developing Branding Solutions for 2013
 
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePointSPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
 

Más de Guido Stevens

Más de Guido Stevens (10)

Filter Bubbles - the discovery of tacit knowledge
Filter Bubbles - the discovery of tacit knowledgeFilter Bubbles - the discovery of tacit knowledge
Filter Bubbles - the discovery of tacit knowledge
 
Designing for Culture Change
Designing for Culture ChangeDesigning for Culture Change
Designing for Culture Change
 
Plone Intranet under the hood
Plone Intranet under the hoodPlone Intranet under the hood
Plone Intranet under the hood
 
The state of Plone Intranet
The state of Plone IntranetThe state of Plone Intranet
The state of Plone Intranet
 
Plone Intranet Consortium - united we stand, divided we fall
Plone Intranet Consortium - united we stand, divided we fallPlone Intranet Consortium - united we stand, divided we fall
Plone Intranet Consortium - united we stand, divided we fall
 
Plonesocial Roadmap PloneConf 2013
Plonesocial Roadmap PloneConf 2013Plonesocial Roadmap PloneConf 2013
Plonesocial Roadmap PloneConf 2013
 
High-performance high-availability Plone
High-performance high-availability PloneHigh-performance high-availability Plone
High-performance high-availability Plone
 
PloneSocial Roadmap PLOG2013
PloneSocial Roadmap PLOG2013PloneSocial Roadmap PLOG2013
PloneSocial Roadmap PLOG2013
 
Door to door
Door to doorDoor to door
Door to door
 
Plone goes social
Plone goes socialPlone goes social
Plone goes social
 

Último

Último (20)

To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 

Share content across subsites in Plone: cultact.subsite

  • 5. URL rewrites # shared user folders rewrite ^/profielen/$ /profielen permanent; rewrite ^/profielen(.*) /VirtualHostBase/http/$server_name:80/ka/VirtualHostRoot/profielen$1 last; # livesearch all content rewrite ^/livesearch(.*) /VirtualHostBase/http/$server_name:80/ka/VirtualHostRoot/livesearch$1 last; # serve subsite rewrite ^/(.*) /VirtualHostBase/http/$server_name:80/ka/maastricht/VirtualHostRoot/$1 last;
  • 6. cultact.subsite ● request marking ● content containers ● assignment behavior ● catalog & collections ● canonical URL SEO
  • 7. Request Marking ● Inspired by plone.theme ● before_traverse hook maps request SERVERNAME to subsite ● request.set('in_subsite', chosen) ● Marks request with subsite-specific browser layer So? ● body class=”subsite_maastricht” CSS and Diazo rules ● Full custom theme registered for subsite layer possible <drop css:theme=".only-subsite-maastricht" css:if-not-content="body.subsite-maastricht" />
  • 8. Content Containers ● dexterity.container ● Inspired by Lineage ● INavigationRoot ● ISite ● Very little content here – subsite-local advertisements – subsite-local contact info
  • 9. Assignment Behavior ● Dexterity behavior to map shared content to subsites ● subsite_home – “main” subsite – single choice ● subsite_syndication – “default visible in” subsites – multi choice ● Used to power browser query logic – default: request.in_subsite in context.subsite_syndication – other: request.in_subsite != context.subsite_home
  • 10. Catalog & Collections ● Catalog indexes – subsite_home – subsite_syndication ● Collection criteria – subsite_home – subsite_syndication ● MultisiteCollection behavior – override Collection to not force INavigationRoot path query
  • 11. Misc Overrides ● override plone.app.layout.links.viewlets.CanonicalURL – point to “home” subsite virtual URL for shared content ● override Products.Doormat viewlet – show correct footer on shared content – uses request marker to retrieve “right” Doormat ● Need to override search in your own custom code