How to remove sign in functionality from Liferay portal - liferay

How to remove sign in functionality, which will display on right top corner of the Liferay portal guest page?
I tried to delete the #sign-in from custom.css file of classic theme which is the default theme for Liferay, but it did not work.

Instead of changing css in custom.css file of classic theme because it will not load changes of css, provide below css in Control Panel >> Site Pages >> Look and Feel >> CSS field.
#sign-in{
display:none;
}

I think the normal way would be to delete/comment out the velocity script code in theme's portal_normal.vm file.
<!--
#if(!$is_signed_in)
<li>
$sign_in_text
</li>
#end
-->
Then you can be sure, that there is no login code in your generated jsp files.

The solution provided by you did not worked for me. But I did changes to your code it started working.
the Change I did is as follows:
.sign-in{
display:none;
}
Instead of '#' I used '.', then its worked for me.
Thank you for the Solution.

Related

Removing Breadcrumb from Sharepoint 2013

I am making a fully customized Sharepoint, and I want to hide the breadcrumb. I tried placing visibility="false" within the Content Placeholder for the breadcrumb, but it only disables the Title and leaves the breadcrumb intact.
There were some fixes for this in 2010, etc. This required adding some CSS to the div containing the breadcrumb, but the breadcrumb is now contained in a Content Place Holder so it changes up the way to do things.
Does anyone have insight into this?
Thank you in advance!
SharePoint 2013 has its breadcrumb hidden by default, so I'm a little confused as to why it's visible in your solution (did you migrate from 2010?).
Anyway, settting .ms-breadcrumb-dropdownBox to { display:none; } with css (which is the out-of-the-box seattle.master way of hiding the breadcrumb) should do the trick.
I ran into the same issue. We did update 2007->2010->2013, and many sites maintained the breadcrumbs. However the CSS entry Kimzter noted didn't work. The one that worked for us was:
.ms-pagebreadcrumb { display:none; }
This is actually one of the few places I use the Script Editor webpart, as we have a lot of sites that want to maintain the breadcrumbs, so changing the master page or master CSS wouldn't work for us.

Footer in Liferay

I need to make a footer in Liferay and use theme for it. What's the simpliest way to do it?
I have created new theme, filled _diffs folder with other folders, but it's empty and I couldn't find relevant docs about this. Should I copy all basic files there? What should I change to create footer?
In Liferay, theme's portal_normal.vm serves as the template to
construct HTML structure of the page. There you define your header,
body and footer includes.
When you will look at the portal_normal.vm of classic theme, you will observe following HTML snippet:
<footer id="footer" role="contentinfo">
<p class="powered-by">
#language ("powered-by")
Liferay
</p>
</footer>
This is the footer of the page. This is what you need to implement. However, it's not necessary to use footer tag at all, as you can simply use div or table based structure with bootstrap or customized CSS classes for your footer, it's upto your requirement.
Remember! Classic theme is just like a sample provided by Liferay, so, it's not good idea to directly customize it.
Everybody needs a whole customized view of the site, and for this the best idea is to create a custom theme (that's what you are doing!), that will give you full control over your look-n-feel.
To kick-start, you can initially copy required folders from classic theme to your customized theme's (_diffs folder) and start changing bit by bit.

Conflicts between Custom theme CSS and Liferay CSS

I am trying to customize the Liferay UI by using custom theme using base as as "_Styled" theme.
I have my own css files which I coped to _diff/css folder of theme and imported them "custom.css" file .However its breaking the presentation of liferay.In my custom CSS I have styles defined for all the standard tags like body,div etc which is impacting the liferay UI too.
How can I resolve this conflict? Thanks in advance!
Quick (and not the best) solution is to remove contents of liferays css file (for example "base.css") and save this empty file in /diff/css/ folder of your theme. This way the base.css will get overriden with your new empty file and thus no styles will get loaded. And your custom.css will be the only stylesheet that is taken into account.
Well, of course it all has an effect on the rest of Liferay as well. Liferay provides quite a bit of the HTML DOM of your page, and if you change the presentation of all of those elements, you'll have to take care to style Liferay's elements too.
Is this a conflict? No. Let's go for the simplest case: You declare div {color:green;}. Of course, now everything, your components as well as Liferay's components, use green text. If you only want to style your own portlets, you might want to specify some portlets: div.portlet-my-own-application {color:green;}
I know that color is a too simple usecase, but I hope it illustrates the solution strategy.
Rather than following Artem Khojoyan's suggestion to override Liferay's base.css, I'd recommend to take a look at the resulting css, what's effective etc., and simplify your own css - adapt it to be used within Liferay - by inspecting the effective CSS for every elements that looks off. Firebug or any of it's relatives are your friend.
I'm afraid, with the details "I'm doing something which has an effect on Liferay UI" there's nothing much more to help you. In fact, I'd hope that what you do has an effect on Liferay's UI... You'll just need to find the proper CSS code
Ideally if your styles are loaded from custom.css, then will overwrite liferay default styles.
In some cases, to overwrite a style in css, you can use !important
for example, liferay default style
body {
background-color: #fff
}
You can specify your style to consider irrespective of order of loading
body {
background-color: red !important;
}

css not getting applied for velocity template in Liferay Theme

I am using LIferay Theme to create a theme for a website.
IN the portal_normal.vm file, I have included all the html code and css I have defined in custom.css
THe problem is that css from custom.css is not getting applied to portal_normal.vm page
SHould I include some file in velocity file which tells that custom.css should be included?
Also is it ok to include all css code in velocity?
Regards
EDIT:
custom.css and portal_normal.vm are inside _diffs folder
put the custom.css under ~/theme/docroot/_diffs/css/custom.css
see the main.css in ~/theme/docroot/css/main.css it should include
...
#import url(custom.css);
...
It should work may be problem in browser cache.. try to run ant clean and then run ant deploy.
and also try to copy portal_normal.vm file to _diff/templates directory.
_diff/templates/portal_noraml.vm and change here.

CSS issues with Web Forms for Marketers in Sitecore

I have successfully loaded WFFM on my local Instance of Sitecore. I have successfully created a Form, I have tested it and everything works perfectly.
I have also successfully been able to render the form using an .ascx web control and placing it in my "main" placeholder. Very happy so far, with one exception.
when I enter the URL of the page where the form is being rendered, my top Navigaton, Left Navigation, Right Navigation, and footer is all a different font then the rest of
my site. I have been able to play with the font sizes of the form, but that does not have any impact on the other placeholders.
I don't know what to do to correct this issue. Any help would be appreciated.
Also the navbar-collapse didn't close in ipad in all page that has form.
Regards,
It might be that the Webform stylesheet is overriding some of your styles. You can view the webform stylesheet under: \sitecore modules\Shell\Web Forms for Marketers\Themes\
By default the default.css stylesheet is used. To start out you can try to remove any font stylings in that stylesheet, to see if that will give better results.
To fix it you might want to add identifiers to the default.css ensuring that it only points to styles inside your allowed placeholder.

Resources