Macro Help​ - Documentation topics on: deprecated,macro help​,.

Macro Help​
Deprecated

IMPORTANT: All of these macros, and almost all other dotCMS Macros have been deprecated.

Please see the dotCMS documentation for information on specific macros.

1. PHOTO GALLERY:

Point to the parent folder of more image galleries:
  #photoGallery('/alumni/galleries/')
  
To specify a folder without listing parent folder:
  #set($folder = $render.eval('/alumni/galleries/folderName/'))
  #photoGallery('')
  
To pull the most current folder according to year or use another variable:
  #set($dateYear = $date.get('yyyy'))
  #set($folder = $render.eval('/alumni/galleries/$dateYear/'))
  #photoGallery('')
  
Create PhotoGallery from image fields in the Content Type: Import this javascrip inside into the widget or page:
    <script type="text/javascript" src="/html/js/lightbox/js/prototype.js"></script>
    <script type="text/javascript" src="/html/js/lightbox/js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="/html/js/lightbox/js/lightbox.js"></script>
    <link rel="stylesheet" href="/html/js/lightbox/css/lightbox.css" type="text/css" media="screen" />
  
Now check for each image fields individually: Eg:checking image field 7, need to specify the server or ip adress
    #if($UtilMethods.isSet($content.picture7ImageInode) && (!$content.picture7ImageInode.trim().equals('0')) )
        <a href="http://216.37.198.3${content.picture7ImageURI}" rel="lightbox[group]"><img src="/resize_image?inode=${content.picture7ImageInode}&w=110" alt="$!{content.Client_Name} Picture 7" class="orange" /></a>
    #end
  

2. FILEREPOSITORY

Get File List
  #fileRepository('/folder/')
  #foreach($file in $filesList)
   <tr bgcolor="#ffffff">
       <td align="center" valign="top"><a href="/dotAsset/${file.identifier}.${file.getExtension()}"><img src="/icon?i=${file.getExtension()}" width="16" height="16" alt="${file.getExtension()} file" border="0"></a></td>
       <td valign="top"><a href="/dotAsset/${file.identifier}.${file.getExtension()}">$file.fileName</a></td>
       <td valign="top">$math.ceil($math.div(${file.size}, 1024)) kb</td>
       <td valign="top">$UtilMethods.dateToHTMLDate($file.publishDate,'MMM d, yyyy')</td>
       <td valign="top">$!file.friendlyName</td>
   </tr>
  #end
  

3. NAVIGATION:

  #navigation(1,1)
  
ADDITIONAL OPTIONS first and last class are assignable.
  #set($firstItemClass = "firstItem")
  #set($lastItemClass = "lastItem") 
  it also prints out with class_level#
  ex: <li class="firstItem_1"><a href="#">First Level Item</a></li>
  a prefix can be added when you have two menu's that contain the same items, that way you can have unique IDs..
  #set($menuIdPrefix = "test") 
  ex: <li  id="test_about_us"><a href="#">About Us</a></li> 
  
MenuItems Macro Check if Navigation will return >0 , then call navigation
  #menuItems(2 1)
     #if($hasItems)
      <h2>Section Overview</h2>
      <hr />
      #navigation(2 2)
   #end
  

4. EDIT CONTENTLET:

This macro creates an edit icon with a link to edit the contentlet being pulled (such as in a loop of a pullContent).
  #editContentlet($contentlet.inode)
  

5. COMMENTS:

  #set($myContent = $ContentInode)
  #set($commentSourceCode = '/test/comments_list_only.vtl')
  #comment($myContent)
  <hr/>
  #set($commentSourceCode = '/test/comments_form_only.vtl')
  #set($commentAutoPublish = 'true')
  #comment($myContent)
  

6. SITEMAP:

pulls everything that has Show on Menu property set
  #sitemap()
  
SiteMapFolderNL - allows to specify the starting folder the number or levels and it won't create a link to parent folders.
  #siteMapFolderNL(2 3 '/alumni/alumni_newsletter/')
    
This is useful when wanting to create listing of pages and have the parent folder listed as well but not made into a link, specially if we dont know if this folder is going to have an index page or not.. eg. folders created by clients. Used in keystone:

7. CRUMBTRAIL:

  #set($crumbSeparatorImage = "/global/images/breadcrumbs_arrow.gif")
  #crumbtrail()