Need to change template styles in Liferay - liferay

I want to change look and feel of liferay using css. i am very new to liferay. Can any give me any idea to do the changes. Thanks in advance

The step-by-step seems complicated, but it's not that bad .....
1a) download and unpack the plugins sdk for the version of liferay you want to use. All the downloads are on the sf page http://lportal.sourceforge.net/
1b) make sure you have the latest version of ant and the JDK version that matches your liferay version (1.5.x or 1.6.x)
2) there are a few main folders in the kit. Change into the "themes" folder and run the create script there in this format (on linux or mac you'll need to make the .sh files executable)
c:\liferay\plugins\themes >create my-name "My Theme Description"
linux/mac $>./create.sh my-name "My Theme Description"
This will create a skeleton theme in a folder called my-name-theme and a folder within it called _diff.
Make whatever modifications you want WITHIN THE _diff FOLDER. (except changes to the properties file within WEB-INF)
Once you've made changes run "ant compile" from within the my-name-theme folder and the sdk will run through it's paces and spit out a .war file to the "dist" folder in the sdk root. You can upload this to the site using the plugin installer
OR ... if you configure the sdk to know where your development server is you can run "ant deploy" from the theme's folder and let the autodeploy magic in liferay do the work.
Once the theme is installed just assign it using the "look and feel" tab in the "manage pages" tool.
TIP : Make most of your changes to the custom.css file .... keeps things easy to upgrade.
TIP : Development is really slow for CSS if you do this for every change .... so if you're running a dev server add a style tag just before the end of the head tag that points into your _diffs/css folder. href="file:///...../_diffs/custom.css". This way whatever edits you make will be compiled into the next version of the war and will override the currently installed version without reuploading. make sure to remove the link before you put it on a live server.
The liferay.com documentation is great and there's a "themer's guide" i can't find the link to right now that got me started.

We've done a number of LifeRay customizations for various companies but your question is too vague for us to answer. If you are just looking to change a few colours and fonts then editing the CSS is fine, but if you are looking to completely change the layout then you need to delve in to the template files and start working with the XHTML.
Provide more details and we might be able to prod you in the right direction :D

IMO theme development for liferay can be quite slow to start with. I have found two different approach quite useful. It works for me, might work for you as well.
If you edit files inside _diff folder AFAIK you have to deploy every
time two see the changes , which can be quite frustrating for
front-end developers. An approch can be edit the css file directly
in tomcat/themename folder. Copy the changed every couple of hours
or so in the _diff folder and deploy. In my case the CSS stays in
C:\liferay-portal-6.1.0\tomcat-7.0.23\webapps\\css\
Also if you are aware liferay supports Sass now. So it you are writing Sass "deploy" may be you most likely option. But I have also figured out a way to speed up that process. Install ruby (if you are in windows, in Mac its preinstalled) > Install Compass > and create a blank compass project. Start "compass watch" . Open bothe scss file and the compiled css file in your IDE. "compass watch" will poll for changes in your scss file and put the compiled output in the css file. Every while you may copy the css output in the css file in theme folder or directly in firebug or web-inspector in chrome/safari.
I have found these are faster dev practice than deploying everytime or completely developing on firebug/web-inspector.
Also if anyone know of better method, specially things like only CSS/JS deploy (or simple copy for that matter if one is not writing Scss), please let us know.

You can make your custom style with the liferay plugins sdk, which can be found here: http://www.liferay.com/downloads/liferay-portal/additional-files
There is a themes folder included, in which you can create a new theme. Liferay generates here a basic theme as a boilerplate, which then you can customize and deploy to your liferay installation.

You can
mvn archetype:generate
then select “liferay-theme-archetype (Provides an archetype to create Liferay themes.)” et voilà you are ready tu customize your theme.
Best practice recommends that you make all your custom themes using only the custom.css file, and that you not override any of the templates unless absolutely necessary. This will make future upgrades far easier, as you won't have to manually modify your templates to add support for new Liferay features.
Deploy the newly created theme using
mvn clean package liferay:deploy

Related

Project not found in java ee file

I've downloaded a file from github(cloned it as well as downloaded it as a zip).
Here is the adress: https://github.com/bargenson/RMT .
I would like to open it to work with it and understand how the author used jsf, validation beans since I have some homework to do.
But my Netbeans (IDE 8.0.2) won't find any project in that file.
So I can't run it and debug it.
EDIT : After unzipping the file, I can't find any project to open in my IDE:
Can you guys help me understand how I can make this work?
Thanks!
The project you linked does not provide the metadata of a netbeans project¹. That means that either the original developer did use some different IDE (or no IDE at all) or that he did not choose to include said metadata into the repository.
You should be able to create a new free-form project from the build.xml within the project directory (after extracting the archive you downloaded). If you only wish to run specific code, you can also directly build the project from shell using ant.
¹ NetBeans uses a nbproject folder within each project's directory to track NetBeans-specific information, such as the mapping of the IDE's run and debug button to actual features of the project.
Try to unzip it. That should work.
For anyone having the same issue, I've finally found out that you can run this kind of project by creating a new project "with existing sources".
It worked perfectyl :)

Creating themes in Liferay

I want to make changes in look n feel of liferay, for that i have created themes using this link
http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/creating-a-the-4
Everything worked fine. I saw mesaage BUILD SUCCESSFULL at the end. But the problem is After clicking on Manage > Page > Look and Feel, i didnt see any theme created by me. So please can u tell me wats wrong with this?
War file is created at Desktop/LR/bundles/deploy/deep-gray-theme-6.1.1.1.war
Should i get(import) this war file from liferay GUI so that themes would be available?
Just check your build.properties file, and to verify check if the theme is present in webapps folder.

Publish Web App files to different locations

I'm start to develop modules for DotNetNuke. I followed different tutorials(most by Chris Hammond) but there is something i don't like, and I'm searching a different way to do so.
He recommends to put a DotNetNuke installation, with IIS and SQL Server, on the developer PC and put your Project into the DesktopModules folder. I don't like it because i want to separate my project from DotNetNuke.
Is there a way to split the build/publish to different location like dll into folder x and all other stuff into folder y?
You could, but I don't really see the point. I see where you're coming from because it seemed awkward to me at first as well, but it really is the most efficient way to develop on the DNN platform. I have mine set up so all of my modules are in the same solution and branched in source from the root DNN folder. We don't keep the DNN core in source so the developer is responsible for that, although that may change at some point to keep versioning consistent.
By keeping your project located where it's installed, you can develop your modules the same way you'd develop any other web app you're building. If you make a change in markup you just have to save the file and refresh your page. If you change something in code just build and refresh.
If you really must keep them separate, you can absolutely do so (really the only benefit of this that I can see is that if you uninstall a module and accidentally click the checkbox to delete files - it happens - you don't have to worry about it). Create your project where you want it, change the Output Path to your DNN bin folder, and create post-build events to copy all of your .js, .ascx, and .css files (plus any others you may need - images, HTML files, XML files, etc.) to appropriate folder(s) in the DesktopModules folder. Just remember that you have to build the project every time you make ANY changes to test them, and you have to write/change your post-build events every time you add a new type of resource, change/add a directory, etc.
Either that or you can build an install package and uninstall/reinstall the module every time you change some padding in your stylesheet ... but I'd stick with keeping the project in the DesktopModules folder.
Sure you can do that.
Set up your solution and module projects anywhere, build the projects and copy the appropriate parts (such as the *.ascx , *.ascx.resx, *.dnn files) back to your website folder -
website/ DesktopModules/Your_module_name
Copy the module dll to the website's bin and you good to go.

J2me -Polish ---Problem related to create and build the project

I am beginner of j2me-polish.I had installed j2me-polish2.1.4.As per the steps shown in below link:-
http://www.j2mepolish.org/cms/leftsection/documentation/installation/ide-integration/netbeans/installation.html
After installing it,I tried to create project by following the step in below link:-
http://www.j2mepolish.org/cms/leftsection/documentation/installation/ide-integration/netbeans/creating-projects.html
But i am unable to create the project.it is showing me reference problem.And wen i tried to solve that problem my adding the emulator of nokia N97 then it not happening properly.
I can't able to build the program.Please help me out.
Please can u help me the for the proper steps related to creating the project and selection the option.
Thanxs a lot in advance
I follow the following steps and it works for me all the time. Download J2ME-Polish2.1.4, install the library and also Netbeans plugin. Perhaps you will need to restart the IDE. Now,
Create a project (for example Polish Table) in Netbeans, making use of J2ME polish plugin. Let's call it
Copy all files except nbproject directory in /samples/tableitem/ to NetBeans directory. Override build.xml created by Netbeans during this copying process.
Copy contents of /samples/tableitem/nbproject (except private folder) to directory. Override all the files.
Switch to NetBeans directory
Edit project.xml file. Comment out tag. Rename project name in tag to the project name created in Netbeans (i.e. Polish Table )
Edit project.properties file in nbproject directory. Change src.dir from src to source/src
Edit project.properties file in nbproject directory. Make sure that libs.classpath= property points to J2ME polish import client library. If not found, make sure that the following two lines are added:
file.reference.enough-j2mepolish-client.jar=C:/J2ME-Polish/import/enough-j2mepolish-client.jar
9.libs.classpath=${file.reference.enough-j2mepolish-client.jar}
Restart NetBeans IDE. From now on you can work completely using IDE. However you will need to compile from command line. Even this could be integrated - but didn't bother to figure out.
Hopefully this should be sufficient to get you started.

How do I add a project to CruiseControl.NET?

I am looking at the cruisecontrol web dashboard. I can see one farm and one server. However, I don't see any way to add a project?
Is this something I can do with the UI or do I need to edit the config file by hand?
You'll need to edit the ccnet.config file by hand (located within the CruiseControl directory) to add projects. There are some graphical tools to help you do this however you do get used to doing it by hand fairly quickly - just have the documentation near by!
Update: An example of one such tool is http://www.codeplex.com/ccnetconfig
You can use CCNETConfig to edit the config file through an UI although it doesn't support higher version > CruiseControl.NET 1.4.
You have to basically edit the configuration file by hand, however I have it setup so that the raw config file is split into different include files, each of which is setup in my source control system. Then I created a project for the configuration, and then for the whole config. So when something changes in the config, CC.NET itself pulls out the changes, recreates it's config files and the refreshes the system configuration.
This means that anyone can edit the config (if they can access the files in sourcecontrol), and no-one has to go into the program files directory of the CC.NET machine itself.
Not sure whether this answers the question you asked, but this is how our setup works

Resources