Is it possible to have global configuration values for a webspace in sulu CMS? - sulu

is there a way to have (kind of wordpress style) some global configuration values in sulu per webspace?
Reason is, that our SEO guys would like the page title after a | in the meta title on every page, but I would like to share the template accross multiple webspaces.
If I could set just a few values different for the webspaces, I could use the as parameters to the template.
Thx a lot!
Andreas

You can create a Snippet for this. And use snippet areas / default snippets. To load this snippet and use its data.
http://docs.sulu.io/en/latest/cookbook/default-snippets.html
So you could create a settings snippet. With all settings you want and then use the sulu_snippet_load_by_area twig extension to load this data after you did select that snippet in the webspace setting for that area.

there is currently no way to manage this in the UI of sulu - we always use twig globals to inject values like that.

Related

Sulu: Is it possible to limit the available page templates per webspace?

I have a sulu 1.6 installation with multiple webspaces. I have multiple page template definitions in app/Resources/templates/pages, like default.xml, homepage.xml, blog.xml, center.xml.
Is it possible to make for example the center.xml only available for the content of one webspace and not all the others?
UPDATDE:
Where can I change this behaviour in the code, that per webspace only the ones are showing up, that are defined in the webspace.xml? This is really blocking and a super bad user experience, since the template is directly linked together with the configured webspace, but the others do not fit.
Thx a lot!
Andreas
The template is only shown in the dropdown if its .html.twig file exists. So if you use the SuluThemeBundle and only a specific theme implements its .html.twig file the template will not be shown on the other theme aslong as the .html.twig does not exists there.
This feature has not yet been implemented, because not too many people have asked for it...
Since Sulu 2.0 you can limit the template on the webspace using the exclude-templates inside your webspace configuration:
<excluded-templates>
<excluded-template>overview</excluded-template>
</excluded-templates>
Before the only way to limit page templates was to work with themes.

May I use variables in Page TSConfig - Typo3 in order to set dynamic content?

I am looking for a way to be able to set some content dynamically in the layout of a typo3 site.
For example, is there a way to set dynamically the title of the site?
So, I am wondering if is it possible to define some variables in Page TSConfig area as shown in the following image.
This option would be very usefull in cases where users are not so experienced to edit this content from Template tools --> Setup.
Thanks a lot!!!
Only admins have access to pages TSconfig field. They have access to the template record (and the TypoScript module) too.
Therefore you should use constants instead which do exactly what you want to archive.
Have a look at the TYPO3 documentation: https://docs.typo3.org/typo3cms/TyposcriptSyntaxReference/TypoScriptTemplates/Index.html
Define in constants:
# cat=page type=string; label=Page Title
title = foo
And use in setup:
config.pageTitle = {$title}

In Typo3, what is the difference between setup, constants, and TSConfig

It seems there are three different places where I can write TypoScript: in templates, there is the constants field and the setup field, and in each page, there is a TSConfig field. However, it seems each TypoScript command need to go in a specific field. Most of the time, I have to try before finding if a given configuration goes into template setup, or in root page TSConfig.
Why are there three different places to write TypoScript? What is the use of each of them?
TSconfig is mainly for the backend
configuration. You can
add/alter/remove values from forms,
change the behavior what kind of
records users can add, default
usergroups etc. see About TSconfig for more
details.
Typoscript in the template is used to change the frontend behavior, template parsing, Extension configuration, navigation etc. Typoscript in the template has so called cObjects which provide useful functionality like Image manipulation (IMAGE), getting records from the database (RECORDS), creating menus (HMENU), see TypoScript Reference.
Typoscript constants are much like variables, which can be used within your template Typoscript. e.g. you have an email address which occurs in many different places within the Typoscript template, you might want to define it as constant. See documentation for more info.

How to apply own template on Joomla? [duplicate]

Joomla is pretty good CMS but, is there any way to create custom template which will be joomla supportable ?
If I understand your question you want to convert an existing template that isn't even a Joomla template. If that is the case I found it very hard to do, of course depending on where the template was coming from. I ended up taking a template for Joomla 1.5 and starting from that. (Although the ja_Purity is a messy one when it comes to the CSS, looking back I would should have started with another one....)
Yes, you can do it. Copy default template which comes with Joomla and customize it, and you can install it now.
Refer : http://docs.joomla.org/Joomla!_1.5_Template_Tutorials_Project
Follow the SiteGround tutorial.
1st result for Google: joomla change template.
If you mean a page-specific template, then this is answered here: http://docs.joomla.org/How_do_you_assign_a_template_to_a_specific_page%3F
It describes the following steps:
In Joomla! there is a default
template, but you can assign other
templates to specific "pages" that are
defined by menu links.
To assign a template to a page, you
must first make sure that there is a
direct menu link to the page.
Go to Extensions>>Template Manager
Select the Template and click the edit icon (or click the template name)
In the left column, change "None" to "Select from List."
Select the links you want to apply the template to.
Save
Note that you cannot assign the
default template to individual pages.

Custom template support for Joomla

Joomla is pretty good CMS but, is there any way to create custom template which will be joomla supportable ?
If I understand your question you want to convert an existing template that isn't even a Joomla template. If that is the case I found it very hard to do, of course depending on where the template was coming from. I ended up taking a template for Joomla 1.5 and starting from that. (Although the ja_Purity is a messy one when it comes to the CSS, looking back I would should have started with another one....)
Yes, you can do it. Copy default template which comes with Joomla and customize it, and you can install it now.
Refer : http://docs.joomla.org/Joomla!_1.5_Template_Tutorials_Project
Follow the SiteGround tutorial.
1st result for Google: joomla change template.
If you mean a page-specific template, then this is answered here: http://docs.joomla.org/How_do_you_assign_a_template_to_a_specific_page%3F
It describes the following steps:
In Joomla! there is a default
template, but you can assign other
templates to specific "pages" that are
defined by menu links.
To assign a template to a page, you
must first make sure that there is a
direct menu link to the page.
Go to Extensions>>Template Manager
Select the Template and click the edit icon (or click the template name)
In the left column, change "None" to "Select from List."
Select the links you want to apply the template to.
Save
Note that you cannot assign the
default template to individual pages.