Creating themes in Liferay - 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.

Related

Visual Studio 2015 MVC Project Template Access Denied

I've created a very simple MVC application in VS2015 which has some basic CSS styling and some HTML to get an application off the ground more quickly.
The application runs perfectly.
I've exported this as a template using File -> Export Template...
I then created a brand new project based off this project type. So far so good. But, now when I run the newly created project I get a blank page with "Access Denied" (see image).
I've been going over the template project and the new project with a fine tooth comb and I can't find any differences. Why would one work but the other give an access denied? I am out of ideas, any help is appreciated.
EDIT:
After more research I have found the cause of the problem, but not a solution.
It seems that the project template has "Anonymous Authentication" as Disabled, and has "Windows Authentication" set to Enabled in the project settings. However when I create a project based on the template these values are flipped and thus causes the Access Denied.
Here's an image of the project settings in the template:
Here's an image of the project settings in the "new" project:
Note that both Authentication settings are flipped. Can anyone tell me how to get this to not happen?
Edit 2:
As suggested, the applicationhost.config files are different which is causing the above problem. Here is the applicationhost.config security section of the Template:
However, here is the same file in the new project created based off the template:
Notice that the section is missing entirely from the new project. So, now the question becomes how do you get this to copy over to new projects?
As suggested by BrianLegg I move my comments to an answer
Seems that the problem is related with the applicationhost.config file. This files it's not present on the zip file which contains the template.
You could take a look on the physical path attribute on
<system.applicationHost>
<sites>
Maybe it's trying to access to the first project instead the new one.
Could you check what is in your applicationHost.config template?
Take a look on Where is the template for applicationHost.config file stored
have you had a look at the global routes? it could be something routes not created or corrupted?

Unique ID for Liferay theme

We have an issue with the theme we created for Liferay and to me it seems like we are doing something wrong, because it seems like a very stupid problem. We use Maven builds for all our plugins and therefore have a build artifact containing a version number. When we deploy the theme, it looks like Liferay creates an ID for the theme based on the theme name specified in the look and feel XML of the theme and the name of the .war file. It looks something like xxxx_WAR_yyyy, which is very confusing to me. When we deploy a new version of the theme, Liferay will create a different ID for it and thus all pages using the "old" theme, will not be updated to the new version.
There has to be some way to specify a unique ID for a theme that will never change, no matter what file the theme has been deployed as. The file name should not have any meaning for Liferay, in my opinion. Is there some way to do this? Obviously we could just always deploy the file with a fixed file name, but somehow it seems to me like we are doing something wrong, missing a configuration setting or something. Is there a way of forcing a unique ID on a theme?
In your pom.xml of theme project, give this
<artifactId>your-theme</artifactId>
<name>${project.artifactId}</name>
This should create a same name artifact when you deploy any version of your theme.
According to the first paragraph of the question as a solution i think , if at first you'll disable the older version theme(not only do it from admin section but also remove that specific theme directory from webapps) , then deploy the newer version of theme. Next enable the newer version theme for all public pages from liferay admin section .Then if you check , in all pages newer version of the theme been applied . If you wish , can also try in this way . Hope this'll be helpful .

I don't see the Web.Debug.config and Web.Release.config files on my web.config after upgrading my project to VS2012

I just upgraded a Web Site project from VS2010 to VS2012 and I was looking into figuring out how to do what I used to do in the DeploymentPackage projects. There is a lot of good questions and answers I've read through on stackoverflow and I know what to do once I am able to find the files I need. For some reason my web.config doesn't have the two files underneath it (Web.Debug.config and Web.Release.config). I've installed the Web Platform Installer stuff and created my profile. I also created a custom configuration for deployment but I still am unable to see these files get created so that I can start changing some of my web.config settings on deploy time. Does anybody know if there's some setting/trick to get these files to show up in a migrated project?
If you don't see the files web.debug.config or web.release.config beneath the web.config file it could be because they are hidden. In the solution explorer panel if you click "show all files" they should appear.
I found the answer in a post here: how to add files in web.config transformation process?
In your "App Data" folder you'll find your publish profiles you created and can right click on them to add a config transform file.

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.

Need to change template styles in 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

Resources