Extending Keycloak theme - themes

I would like to create a custom theme for keycloak for replacing some user-facing pages with a different style.
The keycloak manual describes this process of Creating a Theme and recommends to derive a custom theme from an existing one.
For doing that, the docs reference in the Theme Properties this properties:
parent - Parent theme to extend
import - Import resources from another theme
with an example of
parent=base
import=common/keycloak
Unfortunately, the docs do not describe how that theme-extension does actually work (or I don't get it...).
Does the "parent=base" automatically use all files from that theme and just overlays those from the new theme?
What does the "import=common/keycloak" reference? I can't find any component or file path in the base theme where that would match.

If any of you is interested, I created a theme builder that let you extend the default Keycloak theme... or create a new one from scratch.
Example:
Checkout Keycloakify

When you say parent=base you are extending the base theme.
In your theme.properties the import=common/keycloak imports all the resources from keycloak theme of type common
you can find resources in <KEYCLOAK-HOME>/themes/keycloak/common

Related

Laravel View Component support on view namespace

By default you can add components to resources/views/components and use them using x- prefix with blade files. I registerd a view namespace which is located on different directory and i want the components directory in that namespace to be discovered as well.
Is there a way on laravel 7 to add additional directory to discover?
The instructions for Manually Registering Package Components in the official component documentation at https://laravel.com/docs/master/blade#components should give you the functionality you are after by registering your components manually in a service provider.
That said, it might be worth thinking carefully about why you want to deviate from the default folder.
I hope this helps!

PyroCMS Custom Module Layout

I created a custom module called Drawings. I wanted to give it its own theme layout on the frontend, so I followed the advice I found HERE - I put a layout file titled Drawings.html in my theme.
This had the correct effect on the frontend, but caused other problems and questions that I've been struggling to sort out:
The backend admin section for my module now uses the Drawings.html layout, which breaks its functionality completely. How can I set a specific layout for my module front end, but keep the standard admin backend layout (same backend implementation as in the sample module tutorial)?
I read the following in the Template Library: "When using Public_Controller and Admin_Controller, the layout is already set." Perhaps the solution involves using the set_layout function in these controllers somehow? All my attempts failed so far though.
I feel I am doing something incorrectly because now my module is not modular. For example, after creating the Drawings.html layout file in the theme, a statement like {{ theme:css file="drawings.css"}} in that layout file searches for those resources in my theme. So I have to put those JS and CSS resources in my theme, instead of in my module's CSS and JS folders. How do I keep and access my resources in the module's JS and CSS folders?
I don't know how this is supposed to work.
When you are using front end controller use a layout there using philsturgeon template library like this
function index(){
$this->template->set_layout('drawing')
->build('yourview');
}
This way you can load a custom layout for your application.

How to select theme based on URL in Orchard CMS

Suppose, I have a site named test.com and it has a selected theme of-course. Now I have other tenant site named alpha.test.com for which a theme is used also.
But I want to select the theme for the alpha.test.com from codes where orchard used to select theme. How it is? Please help.
My another question is how to select different theme for different controller or actions in Orchard CMS.
Just implement your own IThemeSelector and use a higher priority than the default one. Do not alter the existing one like has been suggested.
I think these links may help you:
https://orchard.codeplex.com/discussions/359115
http://weblogs.asp.net/bleroy/dynamically-switching-the-theme-in-orchard
There are no tables containing installed themes in Orchard but Themes_ThemeSiteSettingsPartRecord table is used to store the record for current theme only. If we want to select multiple/another theme based on URL then
Ans1 & Ans2: Specify the currentThemeName variable with desired installed theme Name in GetTheme method of SiteThemeSelector class located in Orchard.Themes/Services. If you want to apply different theme based on URL then set currentThemeName inside logic and URL may retrieved from context.HttpContext.Request.

Magento Multi Store themes calling same login.phtml file

I'm new to magento. Currently i'm developing two ecommerce sites using multi-store option in magento. Both the sites are 90% over, last night when i planned to customize the login page i was shocked. The reason is the changes made in first store login page also reflecting in second store also. The login page is curently calling from
frontend/default/default/template/persistent/customer/form/login.phtml
Is it possible to give any custom login page? PLz guide me magento experts......
Please update your post with your frontend/ folder structure down to each theme template folder. It might be that you don't have a copy of login.phtml in the second theme. Moreover you should follow templates best practices as:
Always create for a new shop different packaga. So not
frontend/default
but
frontend/yourcustompackage
Always have default theme left as much untouched, as possible. So in the
frontend/package/default
Should be some basic changes and rules of your package. It means for example in the putting reset.css for all of your themes. Or something like this.
As for me, each store view should have own theme. So, for example, storeview1
frontend/package/storeview1/
There you copy and change files specific for this theme. So, for example, in default you might have login.phtml. But you want storeview1 to have another login.phtml and in storeview2 it should be the same as in default. Therefore you copy the login.phtml from default to storeview1 and change it there. Don't forget to change package and theme in System->Configuration->Design. Package should be change for whole shop and theme should be specified for every store view or left untouched for default.
P.S. Magento theme fallbacks
P.P.S. Try this tutorial or google another one
P.P.P.S. I hope, you got the answer for your question.

How to create a DotNetNuke installation package with custom data, modules, and skins

I have a need to create my own DNN installation package that will include my custom modules and skins along with pages and sample data. Is there a way to do that?
You can setup the site how you want it (with the pages and sample data), and then Export a Portal Template from the Host -> Portals/Sites page.
Then, when you create a new site, add that template to the Portals/_default folder (alongside Default Website.template), and you can select that template when installing the site. Make sure that you also include the packages for your custom modules and skins in the corresponding folder (Module or Skin) in the Install folder.
In terms of sample data, only data in "portable" modules will be included in the template. This includes the HTML module. If you need sample data to come along with your custom modules, your business controller class will need to implement IPortable.

Resources