Modify error pages templates for Keycloak theme - templates

Is there any possibility to change the way how Keycloak displays pages for bad responses(404, 500)?
Maybe redirection or changing template for these pages?
Simple view of 404

See this link,
https://lists.jboss.org/pipermail/keycloak-user/2018-June/014439.html
"... As long as the URL of the error page includes the realm it will use the login theme for that realm. Otherwise it will fallback to the login theme of the master realm. ..."

Sure, you can use custom themes and templates for all kind of interfaces (Web UI, e-mails, error pages etc). You can also extend existing themes and partially override it. Please refer to the themes development guide here.

Related

Can Velocity or Freemarker template be used for VIEW of Custom plugin portlet?

I am trying to have a custom plugin portlet in liferay for which I can customize the view page with velocity or free-marker template like we have for Asset Publisher in Liferay 6.2.
Requirement
I have a screen for admin (CRUD) through which data would be added in my custom tables through this portlet and then there is a VIEW page for all other users.
Now this portlet can be deployed on different sites or different pages with page-scope and the requirement is that it should have a different look & feel for different pages. Currently we are handling this scenario through deploying different themes to configure the look & Feel of the portlet, but we also need some layout changes which is a limitation with themes.
So I was thinking if we can utilize something similar to a velocity template for the View page but I am not sure where to start and whether liferay provides some easy way to do this. So that we create a template and upload it in the configuration and the VIEW page UI is changed.
I would be grateful if there are some pointers to help me in this direction or atleast can say about the feasibility part of it or an alternative.
Thanks
Environment: Liferay 6.2 GA1

Sitecore - Handle 500 errors separately per site in multisite setup

We're running Sitecore in a multi-site configuration and currently have custom 404 pages for each of our sites.
What we would also like is to have custom 500 pages for each site. I haven't found much on how that works (if it does) in Sitecore, and was hoping the community had some insight into how to set up custom 500 pages in a multi-site Sitecore setup. Currently, we have one 500 page the two sites share. This is fine in development, but in production we don't want to expose the fact that these sites share the same box.
Well as per my knowledge, what you can do is you can directly set a URL to be executed (.i.e. it goes to your common Custom Error Page), where you decide the site-specific error details to be shown.
Considering that you are using IIS 7.0 or 7.5, please follow the steps as below:
Open IIS Manager
Go to your Site, in the Sites Section.
Click on Error Pages in the IIS Section.
Next, you will move to the Error pages set by IIS. Go to Error code 500, select it and click on Edit in Actions Pane.
Now select the option of Execute a URL and select a common page, say /sitecore/MyErrorPage/500ErrorPage.aspx and then, handle site-specific error messages in that particular page.
Hope this Helps!
Regards,
Varun Shringarpure
A 500 error is a server error so Sitecore can't process it. It should be a generic flat HTML file configured is IIS or the web.config
You can override the processor "Sitecore.Pipelines.HttpRequest.ExecuteRequest, Sitecore.Kernel" to handle Sitecore error like item not found, layout not found etc. See more details here: http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2013/04/Handling-Errors-in-the-Sitecore-ASPNET-CMS.aspx
But when handling 500 errors you should do it outside of Sitecore, think about what happens if you serve your 500 error page in Sitecore but Sitecore is down due to for example sql connection issues or timeouts? Your users will end I a redirect loop.
Take a look at the Error Module on the marketplace. I think it will give you want you want.

Set Custom Design for frontend Module Page in Magento

I have a custom module in the Magento installation, I am displaying the details of the specific module in the frontend under the URL, www.domain.com/modulename. Now I have two designs one for cms pages and other for the checkout and catalog pages. I want this custom module page in the frontend to be displayed in the CMS page theme but my default template set in the backend is other one.
Is there any possible way available to set the custom design for this frontend module page like we do for the cms pages under the design tab.
Please help. Thanks in Advance.
If you have your own custom module (extension), then you can control the display of it's pages via module controllers. That includes the package/theme configuration. Here is a function code that can be used to control your module package and theme selection.
public function myAction()
{
Mage::getSingleton('core/design_package')
->setPackageName("myPackage")
->setTheme("myTheme");
$this->loadLayout();
$this->renderLayout();
}
That's the only way at the moment of specifically setting custom package/theme for your action-controller-module.

Integrate existing blog code into Django-CMS?

If I already have a blog app done with Django and I want to use it with my new Django CMS site, is it okay to simply drop it into my new Django CMS project as a decoupled app and match anything /blog/ to the blog app as apposed to a Django CMS plugin? I guess what I need to know is when is it best to write my Django app as a plugin vs an entire app?
Thx
JeffC
Yes, but you don't just drop it into the urls.py, instead you can write an AppHook to tie your blog's URL scheme to a particular page in your CMS.
Plugins on the other hand are useful if you want to inserts particular aspects of you app into other page's placeholders - for example to show your latest 3 posts on the frontpage.
You might also want to include your blog's paths in a breadcrumb or menu on your site - in that case you need to write a custom Menu too.
Finally, it might also be useful to make use of django cms's placeholders in you blog model. His would allow you to post a variety of content via plugins.

Sharing to social pages with django

In my django application I have different content across the site. Now I would like to add "Share this to... (Facebook,Twitter,Buzz)" link on each page. But instead of redirecting to a social app page I would like to open popup with (if needed) logging/adding possibility. How to get started ? What steps/operations I need to perform and what ready made applications can I use ? I have already created a twitter app and facebook app and have all the keys.
I mean something like links here http://mashable.com/awards/ (left-side).
Sharethis: http://sharethis.com/ works well in every instance I've used it.
If you want only specific 'share buttons' or with default style justy type " social_name 'share button' " and you will get the js to include on your site (here are the 3 you mentioned in post):
http://www.facebook.com/share/
http://twitter.com/goodies/tweetbutton
http://www.google.com/buzz/api/admin/configPostWidget
If you already have the app written to behave like mashable, one approach is to put the login dialog (if it's needed) in a jQuery dialog. http://jqueryui.com/demos/dialog/