Comments (5)
@gnsimoes this can be done by using the theme bundle as if the view
template can't be found in the default folder or the theme folder the template will not be shown in the backend dropdown.
You need to add the theme bundle to your composer requirements composer require sulu/theme-bundle
As documented add the bundles to the AbstractKernel:
new Sulu\Bundle\ThemeBundle\SuluThemeBundle(),
new Liip\ThemeBundle\LiipThemeBundle(),
Add theme
property to both webspaces.xml file after localization
:
<theme>webspace1</theme>
<theme>webspace2</theme>
Configure the available themes in app/config/config.yml
liip_theme:
themes: ["webspace1", "webspace2"]
active_theme: "webspace1"
load_controllers: false
Now if a template should only be available in webspace2
create the html.twig file of that template only in the theme folder: app/Resources/themes/webspace2/templates/example.html.twig
.
from sulu-minimal.
Hi @alexander-schranz , thanks for your response,
Our question is not about the theming, that we have it well configured with Sulu documentation.
We want to know if it is possible to have in the administration interface, a set of page templates for webspace1 and another set of page templates for webspace2.
At the moment when you create a page, you have available all the templates created on folder app/Resources/templates/pages/*.xml.
from sulu-minimal.
@gnsimoes I did understand you correctly. The theme bundle is the solution for your problem.
Example we add a template app/Resources/templates/pages/example.xml
which is configured as view this way: <view>templates/example</view>
sulu will search for the view in app/Resources/views/templates/example.html.twig
. As we don't want that this template is available in all themes you only create example.html.twig
in the theme you want it to be shown e.g. app/Resources/themes/webspace2/templates/
.
Now Webspace 1 show:
And Webspace 2 shows also the new added template as this is only available in that theme:
from sulu-minimal.
Ok, know I understand with your explanation :) thanks!
I will try on our project and let you know if we could resolve it.
from sulu-minimal.
Hi @alexander-schranz , it works!
Thanks for your help!
from sulu-minimal.
Related Issues (20)
- Admin Login page blank after following "Getting Started" instructions HOT 4
- Route problems HOT 4
- .env file not found at composer create project HOT 1
- Memory error when installing `sulu-minimal` via Composer HOT 2
- Memory error when installing `sulu-minimal` via Composer HOT 4
- admin-bundle javascript hooks advice HOT 6
- No admin dashboard HOT 2
- Routing seems to be messed up right out of the box HOT 3
- no vendor folder after project install HOT 2
- Update deprecated SEO twig functions HOT 1
- Cannot add new media folder - forbidden due to permissions HOT 1
- ProxyManager FileNotWritableException HOT 2
- twig recompile on dev environment
- Parse error: syntax error, unexpected ':', expecting ';' HOT 5
- add Docker container for dev environment HOT 3
- Teaser missing data after clear indexes folder HOT 2
- Problems on running php bin/adminconsole sulu:build dev HOT 1
- `./bin/console cache:clear` fails when running Sulu minimal on vagrant HOT 6
- Sulu CMS 1.6 `Search indexes “page_example_published” not known.` error (1.5 works) HOT 11
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 sulu-minimal.