Advertisement
logicmoo

Untitled

Feb 13th, 2021
1,379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.51 KB | None | 0 0
  1. {{velocity}}
  2. {{context document="$tdoc"transformationContext="transformations"}}
  3. #set($which="")
  4. #foreach($attachment in $tdoc.getAttachmentList())
  5. #set($afn=$attachment.getFilename())
  6. #if($afn.beginsWith("wikipage"))
  7. #set($which=$afn)
  8. #end
  9. #end
  10. #if(!$which.contains("."))
  11. #foreach($attachment in $tdoc.getAttachmentList())
  12. #set($afn=$attachment.getFilename())
  13. #if(!($afn.endsWith(".pdf")||$afn.endsWith(".doc")||$afn.endsWith(".docx")||$afn.endsWith("r")))
  14. #set($which=$afn)
  15. #end
  16. #end
  17. #end
  18. #if(!$which.contains("."))
  19. #foreach($attachment in $tdoc.getAttachmentList())
  20. #set($afn=$attachment.getFilename())
  21. #if($afn.endsWith(".jpeg")||$afn.endsWith(".jpg")||$afn.endsWith(".png"))
  22. #set($which=$afn)
  23. #end
  24. #end
  25. #end
  26. #if($which.contains("."))
  27. [[image:$which||width="100%"]]
  28. #end
  29. {{/context}}
  30. {{/velocity}}
  31. {{velocity}}
  32. #panelheader($services.localization.render("Table Of Contents"))
  33. {{toc start=1 depth=6 numbered=false scope=page reference="$tdoc"/}}
  34. #panelfooter()
  35. #set($pages=$tdoc.includedPages)
  36. #if($pages.size()>0||$showEmptyPanels)
  37. (%style="font-size:10px;font-family:Tahoma,Geneva,sans-serif"%)#panelheader($services.localization.render('xe.panels.includedDocs.count',[$pages.size()]))
  38. #foreach($page in $pages)
  39. *[[$page>>$page]]
  40. (%style="font-size:9px;font-family:Tahoma,Geneva,sans-serif"%)
  41. {{context document="$page" transformationContext="transformations"}}
  42. {{toc start=1 depth=6 numbered=false scope=page reference="$page"/}}
  43. {{/context}}
  44. #end
  45. #panelfooter()
  46. {{/context}}
  47. #end
  48. {{/velocity}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement