Sunday, February 20, 2011

Display hidden childs page in Liferay Footer

Step1. Add these lines into portal_normal.vm under this path your_theme/docroot/_diff/templates. (for importing bottom navigation files)
Add this inside the footer div  
#if ($has_navigation)
           #parse ("$full_templates_path/bottom_navigation.vm")
     #end
Step2. Create bottom_navigation.vm under this path  your_theme/docroot/_diff/templates
<table width="100%">
     <tr>
           <td>
                #set($layoutLocalServiceUtil = $serviceLocator.findService("com.liferay.portal.service.LayoutLocalService"))
                #set($topPublicLayouts = $layoutLocalServiceUtil.getLayouts($layout.getGroupId(),false))
                #foreach ($lay_item in $topPublicLayouts)
                     #if ($lay_item.isHidden())
                           #if ($lay_item.getFriendlyURL() == "/footer-links")
                                <div id="footer-links">
                                     #foreach ($child in $lay_item.getChildren())
                                           <a href="$company_url$child.getFriendlyURL()">$child.getName()</a>
#end   
                           </div>
                           #end
                     #end    
                #end 
          </td>
    <tr>
</table>
Note: Here we are using pages is footer links as hidden parent page, based on your requirement you need charges this line. You need put your page URL.
 #if ($lay_item.getFriendlyURL() == "/footer-links")
Step3. Add these lines into custom.css under this path your_theme/docroot/_diff/custom.css
/**************** Footer Links *******/
/**************** Based on your requirements changes colors *******/
#footer{
      border-top:1px solid #DDD;
      text-align:left;
      margin:0auto;
      max-width:960px;
      margin-top:10px;
}
#footer-linksa,#footer-linksspan {
      color:#2A72C9;
      text-decoration:none;
      font:normal12px 'Lucida Sans Unicode','Lucida Grande',Tahoma,sans-serif;
      padding:2px0px;
}

#separator{
      height:13px;
      margin:0px8px;
      padding:2px0px;
      border-right:1pxdotted #ccc;
}
#footer-linksa:hover{
      text-decoration:underline;
}
Step4. Then ant deploy fromyour theme level

8 comments:

  1. This is extremely helpful info!! Very good work. Everything is very interesting to learn and easy to understood. Thank you for giving information.
    i like play games friv online and play games2girls 2 online free and play game friv games and games 2 girls ! have fun!

    ReplyDelete
  2. Thanks for sharing the information. It is very useful for my future. keep sharing
    Signature:
    download free descargar whatsapp plus and download baixar whatsapp plus online and descargar whatsapp , baixar whatsapp gratis

    ReplyDelete
  3. I would like to thank you for the efforts you have made in writing this article.
    Signature:
    Jugar frozen en línea gratis, los nuevos de princesa de Disney juegos frozen - la princesa encantadora y linda. Divertirse juegos de frozen!

    ReplyDelete
  4. I am very happy to read this. Appreciate your sharing.
    Signature:
    facebook entrar iniciar sesion gratis - Sitio Oficial iniciado sesión en Facebook lengua española. facebook entrar rápido, facebook iniciar sesion en tu cuenta de entrar facebook

    ReplyDelete
  5. Every successful person must have a failure. Do not be afraid to fail because failure is a part of success.
    Signature:
    download baixar facebook movel, Facebook movel, baixar facebook. Facebook chat, baixar whatsapp, fazer o download baixar whatsapp gratis para Android, iPhone. Últimas Facebook

    ReplyDelete
  6. Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more
    happy wheels
    super mario bros
    pacman
    agario

    ReplyDelete