Comments (6)
At the moment copy-pasting is the way to do it. I'll take a look if something like that is feasible to implement.
from comfortable-mexican-sofa.
This would also be useful for layouts.
I think a good implementation would be to have a button "copy it to mirrors" when site mirroring is enabled for pages, layouts and snippets.
from comfortable-mexican-sofa.
I wrote about it a bit in another ticket. The idea is that when multi-site is enabled you can mark layouts/pages/snippets as 'shared'. This will effectively create a copy on each site and keep the content in sync. It's probably not useful for i18n sites, but great in other cases.
Also to answer the original question. You already can output snippet content from arbitrary site like this:
cms_snippet_content(:snippet_slug, Cms::Site.find_by_hostname('hostname'))
from comfortable-mexican-sofa.
My thought on this would be to have a "global" site, that we could pull content from. I have a need for this where I have a client with many small sites that will share maybe a half dozen or so chunks of code between them. Like Google Analytics, and contact forms/info.
I have not decided to move forward with the Sofa yet, but if I do, I may put some effort into this.
from comfortable-mexican-sofa.
+1 for global layouts. this way you can support reusable themes. if you are sneaky you can update the page layout foreign key in the database, but this does not survive edits via the UI.
from comfortable-mexican-sofa.
2.0 will come with better way to manage multisites. Stay tuned.
from comfortable-mexican-sofa.
Related Issues (20)
- 'around action' breaking admin CMS HOT 1
- Passwords cannot be changed by admin users [Bug?] HOT 1
- Feature Request: Work with UUID ID column...
- ERB exposed in JSON response but not HTML HOT 1
- Documentation on Hostname Aliases Unclear
- render cms_layout throws ActionView::MissingTemplate HOT 1
- Wysiwyg file chooser pagination
- undefined method `service_name' for #<ActiveStorage::Blob:0x00007fa1d3eec970> HOT 2
- Rails 6.1 Active Storage's ImageProcessing transformer doesn't support :combine_options HOT 4
- Rails 6.1: support ActiveStorage::Blob#service_name
- Pages index page performance issues
- How to migrate JS and CSS code from 1.x to 2.0
- cms_site_detect fails if request is nil
- Any Updates? HOT 1
- Redirect to 404 page on page not found
- Ruby 3 Support HOT 4
- Content does not get rendered in the layout
- Adding a new Category from the Pages admin view results in an error
- CodeMirror style is broken
- Support for Rails 7? Any maintainers needed? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from comfortable-mexican-sofa.