Making Theme Config Fields multilang? - shopware

I know you can make non editable config values multilang in via src/Resources/config/config.xml but is it also possible for fields defined in src/Resources/theme.json?

This does not seem to be possible as in the admin panel you cannot switch the language at that point.

Related

Drupal how to add a search filter to admin content page

I've never used Drupal before (development or managing content). I was asked to extend the admin content page to have a filter and simply don't know enough to get moving quickly.
Can anyone tell me if adding a search by text filter in the admin content area requires code or is there a CMS feature like adding a node for this task.
If code is required, is there something like a hook for this area? Not sure where to start. I will be investigating on my own but pointers to get me oriented to Drupal would help.
By default Drupal provides search mechanism ready to use. But there are also additional module which can improve search experience. You don't need any coding to use that search. You already have search form block ready to use.
Go to Structure -> Blocks and find block called "Search form". Now all you have to do is to put that block in some region and it will appear on front-end. Of course if it's not already styled by your theme it may be needed to put some extra CSS to make it look nice. There are also some template files which you can override and put some your HTML if you need.
There's also template file for search results page (which of course will work out of box also).
You may also need to create new block region if you want to place your form at some specific place, not covered by any existing region defined by your theme (easy thing to do!).
See https://drupal.stackexchange.com/q/30633/101329, the "Admin Views" module lets you configure the search form as you like.

Conditional fields in Liferay Web Content editor

We have a requirement for creating a banner for which we plan to use Web Content Display.
As part of the implementation I have created a structure with the required fields like link-type (drop-down), etc and using corresponding template.
I wish to make a conditional check based on the type of selection in the link-type and show link-to-page or text-box.
I observed that there is no option to have a conditional check in the article editor rendering.
Thus I wish to check whether there is any hack or trick that we can do to achieve the above conditional thing?
Also, can we inject custom Javascript to achieve this as part of the structure?
I finally have to stick to the default options in the liferay structure. I plan to use separator provided by LR to categories the elements to avoid end user (admin) confusion.
P.S. I was not able to locate any cool doc that would help in implementing the suggestion made by #Tobias (sorry, but I guess the wiki link above assumes you to be an expert of LR, and even the sample links in there does not work).

What is the best practice for overriding strings in Orchard CMS?

I often have the situation where the wording of specific strings from various modules or core features needs to be changed for specific tenants & themes in Orchard CMS.
For example, I may have a client that prefers to have the shopping cart checkout button say "Checkout Now" rather than "Go to checkout" which is a string contained within a view in a shopping module.
I can simply override the razor view in my theme and change the string, however views often are quite complex, and it doesn't feel right overriding a view just to change one string.
Another approach I have tried is to define a po translation file within my theme to override the string from the module. This works because the strings in the module are defined using the T() syntax. However, I've noticed that as soon as I define an override for a string within my theme, this override effects all tenants, instead of just the one tenant that has this theme enabled. I'm inclined to think that translations within modules/themes should be ignored from tenants where they are not enabled.
So I'm left wondering what the best approach for this scenario is?
The localisation/po file approach would be ok if tenants ignored po files from themes that aren't enabled, but then again, it would be really nice if there was a module or feature in core that allowed you to specify string overrides via the admin interface. I guess it's more of a "rewording" task than a "translation" task.
The preferred way of doing this is through template overrides. If you don't want to do that, you can actually break shapes down, and delegate the rendering to smaller templates that are easier to override. This is done by simply refactoring the part of a template that you want to be able to override individually into a separate template. This post explains how to do that: http://weblogs.asp.net/bleroy/creating-shapes-on-the-fly
If you're not willing to do that, you can use this module to get strings from the database instead of po files: http://gallery.orchardproject.net/List/Modules/Orchard.Module.Q42.DbTranslations It should be possible to modify it to fit your sceanrio.

Xpages - Value picker UI customization

I want to create a custom value picker which can have:
Same labels
Can't use simple Domino view value picker as I need to check individual entry for some business criteria
I want to show a short summary as well to help user distinguish among similar labels (I want to add some formatting to it e.g. label in bold, summary in green small chars)
I can create an Xpage for all such value pickers or I can have a custom data provider. Now, my question is, do I need to create a custom renderer as well to display Label with summary? How do I implement the picker with modal look-n-feel (I am using bootstrap theme)?
Thanks in advance
Arun
Version 12 of the Extension Library included the code I contributed for Map Picker Data Provider and Collection Picker Data Provider. Implementing data provider outside the Extension Library packages is quite complicated - there are a lot of methods used for getting options etc that are protected, so they need reproducing. They're currently designed to take a label and value only, so they would need extending to take a summary as well.
I don't think the picker can take HTML as a picker option - that would allow you to pass in the formatting for the label and the summary. I've not tried it, but if it was allowed it would impact searching etc, so that makes me suspect it's unlikely.
Creating a renderer with bootstrap look and feel is possible. I'd recommend looking at the Extension Library renderers. It looks like the picker renderers handle the link on the page and separate classes handle the dialog that's displayed.

modify the text of conditions of use in liferay

I work with liferay 5.2
I want to change the text which appears after the first login
this text contains the conditions of use
but I didin't find this text in liferay
Please check \portal-web\docroot\html\portal\terms_of_use.jsp .
There are two ways terms of use appear in liferay.
You can set below portal properties in portal-ext.properties to make your web content to visible as term of use content.
Specify the group id and the article id of the Journal article that will
be displayed as the terms of use. The default text will be used if no
Journal article is specified.
terms.of.use.journal.article.group.id=
terms.of.use.journal.article.id=
If you want to just modify some of part of term of use content which Liferay provides then you can override "terms_of_use.jsp" in hook and provide changes in content.

Resources