#** * Bookmarks and bookmark folders. * @author Lance Lavandowska (conversion to Velocimacros) *# #** * Shows a single bookmark with image if bookmark has one, with RSS feed link if * bookmark has one, and with HREF title if bookmark has a description. * @param bookmark BookmarkData object to be displayed. *# #macro( showOneBookmark $bookmark)
  • #if( $utilities.isNotEmpty( $bookmark.Image )) #if( $bookmark.Image.startsWith("http://") ) $bookmark.description #else $bookmark.description #end #else #if( $utilities.isNotEmpty( $bookmark.FeedUrl ) ) $text.get( #end $bookmark.name #end
  • #end #** * Displays the Bookmarks in a Folder instance. * @param folder FolderData object to be displayed * @param showFolderName True to show folder's name * @param expandingFolder True to show expandable folder *# #macro( showFolder $folder $showFolderName $expandingFolder ) #set( $bookmarks = $pageModel.getBookmarks($folder) ) #set( $divId = $utilities.stringReplace( $folder.Name, " ", "_" ) ) #if ( $showFolderName && $expandingFolder )
    + $folder.Name
    #end #end #** * Displays a bookmark folder as named. * @param folderName Name of the folder to be displayed. * @param showFolderName True to show folder's name * @param expandingFolder True to show expandable folder *# #macro( showBookmarks $folderName $showFolderName $expandingFolder ) #if ( $pageModel.getFolder($folderName) ) #showFolder($pageModel.getFolder($folderName) $showFolderName $expandingFolder) #elseif ($showFolderName) $text.get( "macro.bookmark.error", [$folderName]) #end #end #** * Display all Bookmarks (from all Folders) for user. * @param expandingFolder True to show expandable folder **# #macro( showAllBookmarks $expandingFolder ) #set( $root = $pageModel.getFolderByPath("/") ) #showFolder($root true $expandingFolder) #end #** * Show link to OPML file for specified folder. * @param folderName Name of folder to be displayed (or / separated path) *# #macro( showOpmlLink $folderName ) #if ( $pageModel.getFolder( $folderName ) ) OPML badge #else $text.get( "macro.bookmark.error", [$folderName]) #end #end