I've developed a custom theme for Liferay 6.1.1 and it's working fine on my local installation of Liferay. When I try and deploy to my QA server, the theme shows up in the control panel and I'm able to assign the new theme under Control Panel->Site Pages->Look and Feel.
The problem is that thought the theme is assigned, the customization I've done is not reflected in the UI.
The process I'm using to deploy is:
Create theme-name.war file by using the Eclipse "Export" functionality.
Place the war file in the deploy directory.
Is there something I'm doing wrong?
Try to open the XML file build-common-theme.xml under the themes folder in your SDK and remove all the preservelastmodified="true" (or set them to false).
preservelastmodified, when true will not update the files timestamp in your theme project. Therefore, your application server will not detect the changes and redeploy the theme.
In my opinion you should clear the browser cache and then check again.It happened to one of my theme as well.
Related
How can we remove default HomePage Theme with Custom Theme in DNN 8? I haven't got any blog providing me clear idea about it.
You can change the styling of a page by changing the "Skin" or "Theme" in the Page Settings on the page.
Update:
To create a skin I highly recommend you follow my tutorials:
http://www.christoc.com/Tutorials/All-Tutorials/aid/8
In order to use the DNN Theme Project template (new with the 4.0 release of Christoc’s development templates, January 2015), you will need to follow the steps laid out in this tutorial exactly. If you choose to not follow each of the steps, you may run into trouble and will have to figure out things on your own. As always, support for our tutorials is provided in the form of paid DNN Support and Consulting. You can also visit www.dnnchat.com and possibly get some free support there, but no guarantees are made that support will be provided there.
Prerequisites
The latest release of the Project templates requires Visual Studio 2013+, it will not work on VS2010 or VS2012.
As with the Module Development templates, the Theme development template requires you to have your DNN Development environment configured in a specific way. You should have your development environment running at the URL http://dnndev.me/ good news for you, it is very easy to do, all you need to do is follow this tutorial.
Once you have your environment setup, you need to install the Project templates. This is another easy step, simply follow this tutorial.
Now that you have the Templates installed, you can get to doing the real work, working with the Theme project template itself.
How to use the DNN Theme Project Template
Run Visual Studio 2013 as an Administrator (right click on the shortcut to do so)
File –> New Project
Choose the Visual C# option from the Languages section of the new project dialog
Select the DotNetNuke Folder
Choose the DotNetNuke C# Compiled Theme template for your project template
For the new project creation screen using the following settings
Name: ThemeName (something unique here, example MyFirstTheme)
Location: c:\websites\dnndev.me\portals_default\skins\ (this assumes you setup your development environment as instructed) DO NOT PUT THE SKIN IN /PORTALS/#/SKINS/
Solution: Create new solution
Create directory for solution : Unchecked (this will cause path problems if checked, the templates assume the SLN is in the same folder as the project file)
Add to source control: Unchecked
Click OK
Once your Theme has been created, you will want to perform the following steps.
After project creation steps
Delete the Documentation folder (it isn’t needed)
Switch from DEBUG to RELEASE mode
Build the project. This will create an INSTALL and SOURCE zip file in the /install folder within the project’s folder on the file system (/portals/_default/skins/themename/install/)
Login to your DNNDEV.me site with a HOST/Super User account
Navigate to the Host/Extensions page
Upload the newly created INSTALL zip file (created in step 3) using the Install Extension Wizard on the Host/Extensions page.
Navigate to a Page and apply the skin to your page.
A few items of Note:
The Theme template and package MUST be in the /portals/_default/skins/ folder, not in one of the individual portal’s (/portals/0/skins/) folders.
The Containers are inside of the Containers folder, inside of the project. This is not where DNN expects them to be, they need to be in /portals/_default/containers/ThemeName/. The Project templates will put them into that location in your development environment when you BUILD the project in RELEASE mode. During Installation in another environment, when installing the INSTALL package for the theme will do the same thing.
I am used to work with rails locally where I can use any text editor I please while I have the server running. If I make changes to a file Webrick, it will pick it up and I am able to see the changes on the page.
Can I do this with eclipse?
I am using Atom for html editing but every time I save the changes and reload the page, the changes are not done. Any ideas?
Is your project an Eclipse Web project associated with a server in the Eclipse Servers view? If so, double-click on the server and you'll be able to tweak a few thing. The interesting option would be Automatically publish when resources change under Publishing.
PS: if you're using Java Enterprise or JBoss technologies, you can add JBoss Tools on top of your Eclipse IDE, it features some features and default settings that should make things simpler for you.
I've found the answer by going to eclipse in Preferences > General > Workspaces > Refresh using native hooks or polling
This way I am able to edit html files with Atom. Hope it helps someone
Question for reference: eclipse, refresh files edited by external editor
I build a maven project and deploy this war into tomcat webapps folder then started tomcat, so that my app available in browser as localhost:8080/myApp
I can see myApp folder which was extracted from myApp.war under tomcat/webapps.
I can modify this app's UI by editing files undertomcat/webapps/myApp/.. using Notepad++.
I send this project to my co-worker, he also import this project in his eclipse and run this app.
He changed the jsp and js files from eclipse and the result will be reflected in browser, he never used separate editor to this modification.
If I change the files in eclipse then it is not reflected in browser.
What I need to do for the same to be working to me?
If you just want Hot deploy in Eclipse, please try to take following steps:
Double clicks on the Tomcat plugin, refer to publishing tab, make sure Automatically publish when resources change is selected. This should be the default option, to support “hot deploy” resources, for example : JSP, XML and properties files.
In the Tomcat Plugin page, clicks on the Module view, make sure Auto Reload is Disabled. Default is enabled.
Note:
This is an important step, failed to set the auto reload to disabled, the Tomcat server will be restarted every time you modified something!
Start Project in DEBUG mode. Hot Deploy is supported in DEBUG mode only.
Limitation
Hot deploy has supported the code changes in the method implementation only. If you add a new class or a new method, restart is still required.
To simulate it, try to add a new method, following pop up screen will be displayed, saying the code changes cannot be hot swapped in the JVM.
At work, we develop Java applications and are using Eclipse. As a frontend dev I would like to switch completely to Sublime, but it's missing a feature of Eclipse, I can't work without it.
When developing, I had to build the project with Maven and publish it to a Tomcat server. Eclipse does this all automatically and also republish changed files.
I came so far, building the app with Maven and publish it to Tomcat with the Maven-Tomcat plugin. But with Tomcat 7 republishing isn't possible and changed files aren't copied to the working directory. So I have to leave Eclipse open and refresh its workspace everytime I changed files in Sublime.
Would it be possible to integrate this functionality into Sublime with any plugin?
Rather than deploy to a specific Tomcat 7 container that you ave set up yourself, I would instead use tomcat7:run to start a live container based on the unpackaged web app.
That should get you pretty much exactly what you are after.
If you don't mind switching to jetty as a server container jszip:run can get you even more, but I'm still working on getting that plugin to beta quality so ymmv
What about this plugin https://github.com/nlloyd/SublimeMaven? I'll try it tommorow and then I'll let you know if it do the job (if it will work with ST3).
Eclipse has a feature for this. Select "Refresh using native hooks or polling" and "Refresh on access". You should select both. I have tried only selecting "Refresh using native hooks or polling", but it works only when you keep open the specific file in eclipse and modifying it outside. "Refresh on access" also not working alone. With these options combined it works charmingly.
PS: Native hooks available only in Windows. For Linux and Mac polling is used. I don't know how efficient it is.
I had this problem too. The workaround, is to open both eclipse and sublime, and instead of refreshing your project manually in eclipse every time you have made some changes in sublime, u can can use this plugin https://github.com/psxpaul/EclipseJava7Refresher to make the refresh automatically.
PS : As mentioned by #Kapil Dev S, eclipse (with "Refresh using native hooks or polling" checked ) can refresh automatically resources when changed, but it doesn't detect changes as soon as it happens (it takes some seconds, at least for me on Linux)
I'm creating a JSF/Facelets web app in Eclipse. I've configured my project to use a Tomcat (6.0) server that is started/stopped by Eclipse.
Whenever I save a file (eg .xhtml) Eclipse restarts the app, trashing my HTTP session. This is annoying, because I'm frequently updating my .xhtml files, and the app doesn't need restarting to detect the changes.
Is there a way to stop Eclipse restarting the app? Specifically, can I configure Eclipse to only restart the app when I save files of a certain type?
In the server View, double click on your Tomcat instance.
This will open the properties of your Tomcat server.
As I am not sure of which parameter will help you to solve your problem, check the following options in the latter view:
Automatic Publishing, option "Override default settings" selected, 1 second for the publishing interval.
In server options, uncheck options "Server modules without publishing" and "publish module contexts to separate XML files".
In the modules tab, for each modules deployed, check that Auto Reload is enabled.
Hope this will help you.
I have always used this and it works fine for me. The context is reloaded only when you change classes or the web descriptor.
In your project structure where you keep .xhtml files which makes eclipse reload the context on changing?
This can happen if you have a builder in Eclipse set to deploy on save. Right click on your project -> properties -> builders
Turn off "Build Automatically"