I would like to know whether Liferay can divide email templates into logical sections and manage these sections. Furthermore I would like to manage the email templates with Liferay's content management system.
Liferay contains email template in tmpl files, which are not manageable like WCM, So in case if you want to change or manage that templates then you need to create class level hook. For that you have to create a path in hook xml, which indicate that your template will placed in /root/web-inif/classes folder of tomcat server. then need to restart your server. After that your changes will reflect.
XML file path.
\ROOT\WEB-INF\
and hook folder structure will be upto the classes folder.
Related
I'm on extended medical leave from my job and practicing at setting up my own workspace at home without the assistance of workspace setup documentation. I know I need a web.xml file somewhere in this structure but I'm not sure where it goes in the Web Content.
I'm only looking to create an input text field to enter a number and the user receives a number back from the tomcat server, but I don't know the proper place to create the Servlet java file in this particular folder structure.
My project has the standard Java Resources, Javascript Resources, build, and WebContent directories so far.
I've tried to Google for a similar project setup but no Youtube or Google workspace tutorial has shown the same workspace setup that I have. Does anyone know of one?
Yours Truly
(As Humanly Possible)
cnight62
I'm very new to Liferay theme development and i'm trying to find the most optimal workflow for development.
So I've been experimenting with creating Web Content Templates and Web Content Structures within Liferay CMS configuration.
What I would ideally like to do is create my view "Web Content Structure" outside of Liferay configuration and instead have it as a view/template inside my theme files so that I can have my code peer reviewed and version controlled in Bitbucket.
Is this possible?
Alternatively is there a way to output the values of a given web content instance within my theme?
I'm building a theme for Liferay 7 by the way.
Thanks in advance
Richard
You can copy and paste the structure when you create them form the LFR editors into your source code repository.
Also if you know how to define the JSON you can do it straight in the file. The free market templates are even easier to edit in file format. When you're done, you need to go and upload the artefacts to the portal via the editor/file upload option.
You can't stick it into the theme because that approach would not allow you to do updates.
You can search for a community plugin or write your own one that would do structure/template updates during deploy.
I have created portlets for liferay and prepare couple of pages. Now I want to create installation script, which create pages definition in customer liferay server. I know that pages export/import is possible using LAR file, but this could be done only manualy, or using remote publishing which i am not able to do.
I was searching on net and found ddm tool. Which should be able to do that. Unfortunately i'm not able to get it work as it export only web content, blogs, wikis, etc, but not pages with portlets. It is probably because one of the condition is "Every Template must be assigned to a Structure. Don't create any templates on the Liferay server which does not have a structure connected to it.
". But how can I assign page to structure ? Cant find anything.
Or is there any other option for automatic page creation, which could be used ?
In case you created a custom theme, you can easily use the "resources importer" to create an entire site via the "sitemap.json" file (define pages: choose layout, assign portlets to the columns, ...). You can also export existing content as xml from the current instance and import them via the theme. Same thing for web content structures and templates.
for more details: https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-1/importing-resources-with-your-themes
Unfortunately theme is produced by another supplier, so this solution isn't suitable for me.
at the end i find working solution which consist of following steps:
create plugin hook
in hook setup upgrade process
in the upgrade process create pages with appropriate layout, friendlyUrl, etc. All these is possible to do using liferay api
Don't have enough reputation, so at least two links
https://www.liferay.com/de/web/james.falkner/blog/-/blogs/7cogs-is-dead-long-live-7cogs-
https://github.com/azzazzel/liferay-official-plugins/tree/master/hooks/sevencogs-hook/docroot/WEB-INF/src/com/liferay/sevencogs/hook/upgrade
Is there a way to include Liferay document or web-content structures and templates in portlet plugin war files and have them become available to users like the standard ones are?
The use-case would be that you are writing a portlet that takes advantage of a custom Document Library structure that you are providing. But you don't want to distribute this structure as a separate thing with its own installation procedure (such as providing a LAR just for the structure), you just want your plugin to make the custom structure available whenever it is installed.
You can achieve your goal by adding a portal.properties file to the WEB-INF/classes directory of your portlet. This file should contain the following line:
application.startup.events=com.yourcompany.whatever.YourCustomStartupAction
This custom startup action should be a class that extends from com.liferay.portal.kernel.events.SimpleAction. In it you will be able to leverage all the Liferay service utils to do things in Liferay at the moment your portlet is started. The class you need to use to work with the Liferay document library specifically is DLAppLocalServiceUtil. This util class has all the necessary methods to work with files/folders in the document library.
For web content related stuff, such as structures, templates and articles, just use JournalStructureLocalServiceUtil, JournalTemplateLocalServiceUtil and JournalArticleLocalServiceUtil.
I hope i got your question right ;)
You could create the folder Structure via the DLFolderService when the portlet is deployed.
To run a method when the Server starts you will have to use the CustomAction i think, check it out : here
I know this is not specifically a programming question, but programmers will often have to do this work.
How do I create a website with Liferay portal - the docs are pretty light on this fundamental issue and are all for version 4.4. I am using version 5.2 and the docs don't seem to be relevant.
Do you know what the basic steps are. So far I have logged in as the bruno user and can see the 7cogs website and edit it. But I now need to create my own website (for my company) and be able to develop portlets to add to the parts of the page.
Further I notice that the docs talk about doing work in Eclipse. If our website is all static HTML, (the reason we want liferay is mainly so that we can edit content items using its content management tools), then will there be any need for Java dev, or will it all be drag n drop and clicking to get setup. Any guidance will be much appreciated.
Liferay can be used as a simple CMS, without much Java knowledge : creating, editing and positioning of web content fragments are drag'n'drop and use of the included rich text editor.
But to start using Liferay for your company, there are two main steps : a technical configuration (database, etc.), and a look'n'feel customization.
The technical part
First of all, you should get rid of the 7cogs website : this is called a hook in the Liferay wording. To do that, if you are using Tomcat for the application server, just delete the 7cogs directory as stated here.
You can now create the configuration file for your installation : it's a simple text properties file, named portal-ext.properties and placed in the webapps/ROOT/WEB-INF/classes folder of your tomcat installation.
This file handles most of the configuration of the Liferay portal, for example :
the name of your company
if you want to display a terms of use page on first login
if you want anybody to be able to create an account on your portal
the database where the data will be stored
To do this, the properties in the portal-ext.properties override default properties found in a embedded portal.properties file located in the jar file portal-impl.jar, in the webapps/ROOT/WEB-INF/lib directory. Just unzip the jar file in a temporary folder to access the portal.properties file.
A sample portal-ext.properties file :
company.default.web.id=yourcompany.com
terms.of.use.required=false
company.security.strangers=false
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root
Once done, you can startup your application server. As the default admin (named test, something you can change in the portal-ext.properties file), you can access to the centralized web "control center", located in the "dock" (the strange menu labelled "welcome Test" in the upper right part of any page once logged in).
I would advise you to read the administration guide, useful for most administrative tasks.
The "branding" part
Liferay uses "Themes" to automatically decorate the portal pages (logo, navigation, portlet borders...) using images, CSS, Javascript (JQuery) and the templating language Velocity. The themes are bundled in a .war file, like a standard web application, and deployed on the fly either via the control center or by dropping the file in the deploy directory of the server.
Liferay can use several themes at the same time, one for each community (a group of pages, users and content) for example.
Creating your own theme can be done afterwards, using the "Plugins SDK".
The Wiki, forums and blogs can be very useful.