Liferay5.1.2主题研究(二)

更改liferay自带的名为liferay-jedi-theme的主题

 一 、更改/webapps/liferay-jedi-theme/templates/portal_normal.vm文件:

 

#parse ($init)

#set ($company_url = $company_url + "/web/guest/home")


 $company_name - $the_title

 $theme.include($top_head_include)

 #css ($css_main_file)
 #js ($js_main_file)
#*=======================hide  logo=============
 #if ($company_logo != "")
  
 #end
-------------------------------*#
 #set ($groupLocalService = $serviceLocator.findService("com.liferay.portal.service.GroupLocalService"))
#*下边这句话不要注掉,注掉就不能显示文字页角了*#
 #set ($guestGroup = $groupLocalService.getGroup($company_id, "Guest"))

 #set ($journalTemplateLocalService = $serviceLocator.findService("com.liferay.portlet.journal.service.JournalTemplateLocalService"))

 #set ($journalTemplateId = $theme_settings.getProperty("css-template-id"))

 #if ($journalTemplateLocalService.hasTemplate($guestGroup.getGroupId(), $journalTemplateId))

  ## Instead of reference the URL, just insert the content to save an
  ## extra HTTP request.

  ## -->

  #set ($journalTemplate = $journalTemplateLocalService.getTemplate($guestGroup.getGroupId(), $journalTemplateId))

  
 #end 

$theme.include($top_messages_include)


 

 #if ($has_navigation)
  #parse ("$full_templates_path/navigation.vm")
 #end

 


  #if ($selectable)
   $theme.include($content_include)
  #else
   $portletDisplay.recycle()

   $portletDisplay.setTitle($the_title)

   $theme.wrapPortlet("portlet.vm", $content_include)
  #end
#**************页脚*#
  


 

$theme.include($bottom_ext_include)
$theme.include($session_timeout_include)
$theme.include($sound_alerts_include)

 

二、心得体会:

页脚代码中有“56_INSTANCE_qltu”,代表的是当前社区的日志文章的portlet的id。要在页脚上放日志文章portlet,必须要把这个id写对,并且要修改liferay-look-and-feel.xml中的13807">。13807是对应的文章号。两个必须都写正确,页脚才能显示出文字。

另外,5.1.2版本的对应的这个文件比5.0.1多了一些设置,上边绿色的字就是多的。暂时不知道多的这些是做什么的,不过,其中第一句不能少,如果少了它,页脚的文章也还是加不进去。

你可能感兴趣的:(liferay研究,include,templates,class,portlet,url,stylesheet)