Bloggers recientes

David Truong

18 Mensajes
19 de octubre de 2016

Charles Lam

2 Mensajes
17 de octubre de 2016

Kyle Joseph Stiemann

7 Mensajes
17 de octubre de 2016

Marcos Castro

8 Mensajes
13 de octubre de 2016

Olaf Kock

118 Mensajes
12 de octubre de 2016

Sven Werlen

4 Mensajes
10 de octubre de 2016

Sushil Patidar

6 Mensajes
4 de octubre de 2016

Maarten van Heiningen

3 Mensajes
29 de septiembre de 2016

Christine Reyes

2 Mensajes
27 de septiembre de 2016

Javeed Chida

13 Mensajes
27 de septiembre de 2016

Select Category And add Post in message board using velocity template

General Blogs 7 de mayo de 2013 Por chirag @ India

Hi Guys,

It is possible to put web content of MB-category in every page rather than to display message board in every page in website .

On selecting category, we will open a pop-up dialog box for inserting  Post in message board. 

Template Code :


#set ($MBLocalService= $serviceLocator.findService("com.liferay.portlet.messageboards.service.MBCategoryLocalService"))
<form name="frmmb" id="frmmb">
<select name="foo" id="foo" onchange="pop(this.value)">
<option  value= "select">  -select-- </option> 
#foreach ( $c in $cat)
<option  value= "$c.getCategoryId()">  $c.getName() </option> 
<script type="text/javascript" charset="utf-8">  
function pop(value)
var s=value;
 AUI().ready('aui-dialog','aui-dialog-iframe','liferay-portlet-url', function(A) {     
    var url = Liferay.PortletURL.createRenderURL();      
  window.myDialog = new A.Dialog(             {               
  title: 'Ask a Question?',   
              width: 640,           
      centered: true            
 }         ).
   A.Plugin.DialogIframe,             {               
  uri: url.toString()+""+s,               
  iframeCssClass: 'dialog-iframe'             }  
       ).render();     }); 
<input type="button"  class="aui-button-input aui-button-input-submit"  name="dialog" value="Select Catagory & Add Question" />


I implemented this code at  Visit For Better Understanding .

Make Video Page Look Like Youtube Using Structure and template

General Blogs 23 de abril de 2013 Por chirag @ India

Hello Guys 

For That We have To make two structure abnd template 

One For Add Video And Another is for Display Video

1) addVideo Strucutre and template

open Youtube and copy video url which you want to add and paste in textbox in structure then publish

Structure for add video

Template Code For add Video


<div id="web-video">
<iframe width="500" height="300" src="$n?feature=player_detailpage" frameborder="0" allowfullscreen></iframe>
<div id="video-discription">
2)  Display all Video using company id
Only Template is require to display video ,so used blank structure .
Template code:
#set ($journalArticleLocalService = $serviceLocator.findService('com.liferay.portlet.journal.service.JournalArticleLocalService'))
#set ($UserLocalService = $serviceLocator.findService('com.liferay.portal.service.UserLocalService'))
#set ($companyId = $getterUtil.getLong($
#set ($curArticle = $journalArticleLocalService.getCompanyArticles($companyId,0,-1,-1))
#set ($ExpandoValueService= $serviceLocator.findService("com.liferay.portlet.expando.service.ExpandoValueLocalService"))
#set ($targetPortletID = "56")
 <div  class="video-list">
#set ($counter = 0)
#foreach ($article in $curArticle)
#set($arc = $arc - 1)
#set ($articleUrl = "/widget/videos/-/journal_content/" + $targetPortletID + "/" + $article.groupId +  "/" + $article.articleId)
#set ($document = $$article.getContent()))
#set ($title = $document.valueOf("//dynamic-element[@name='Video-URL']/dynamic-content/text()"))
#set($userx = $UserLocalService.getUser($article.getUserId()))  
 <li class="videoli" style="list-style: none;width:330px;border-bottom: 1px solid #DDD;min-height:150px;">   
 <a href="${articleUrl}" target="video"><img src="$n/default.jpg" style="float: left;
padding-right: 20px;
     <h4> $article.getUrlTitle() </h4>
     <a href = "/web/$userx.getScreenName()">
     $userx.getFirstName() $userx.getLastName()  </a> </br>
     $Degree.getData() </br>
#set ($counter = $counter + 1)
I implemented this code at  Visit For Better Understanding .

Google WebMaster tool in liferay

General Blogs 18 de abril de 2013 Por chirag @ India

For Better SEO  for your website register your site in google webmaster tools.

To Register your site in Webmaster tools Follow Steps:

!)  sign up /sign in at

2) add your website

3) Now as shown in below screenshot it will ask to verify ownership of website by  giving a html file to be uploaded on your Website in <HEAD> tag.Now as we have no server access to upload this file in root directory.So to get rid of this problem we have to first download that html file and upload that file in document library in liferay 6.0 as well as in 6.1.x in document and media.

4) After uploading a file ,Create a new page with name, same as  the file name you uploaded with given extension as shown in below screenshot

5) As shown above ,select the page type to be"URL"

6) In URL field add the url from the document library where you uploaded the html file.

7) And your site is registered in google webmaster tools.

Mostrando 3 resultados.