We already know how to create web content using structure and template but Sometimes we create template in our theme and then import this in our web content template . So today we will discuss how to import template from theme.
So lets start this step by step:-
Step 1:-Create a template inside theme
I create a theme with name liferayiseasy-theme and then create a test-template.vm inside the _diff folder:-
you can write your template code in this file and deploy the theme.
Step 2:-Import this file inside template
Now click Admin->Content->Manage->Template->Add the template and paste this:-
#set($theme-path = "liferayiseasy-theme_SERVLET_CONTEXT_/templates")
#parse("${theme-path}/test-template.vm")
For more detail you may read how to create structure and template.
Now you can render your web content with this template .
Hope this will Help....
Related Post:-
Basic web content in Liferay
Categorization in web content
Structure and Template in Web Content
Fetch Web Content Programmatically
Get Journal Article Using SAX Parser
Form Handling in Spring Portlet
Embedding a Web Content in a Portlet
Fetch Latest Version Journal Article or Web Content in Liferay
No comments:
Post a Comment