kinyelo / vosao

Automatically exported from code.google.com/p/vosao
GNU Lesser General Public License v2.1
1 stars 2 forks source link

Add Velocity service to access page resources. #383

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add Velocity service for accessing page's resources from Velocity templates.

Example of pages' resources listing:

#for($fileVO in $service.findResources($page.friendlyURL))
  $fileVO.title 
  $fileVO.name
  $fileVO.mimeType
  $fileVO.size
  $fileVO.link
  $fileVO.modDate
  #if($fileVO.imageFile)
    Image : 
    <img src="$fileVO.link" /> 
  #end
  #if($fileVO.textFile)
    Content:
    <pre>$fileVO.content</pre>
  #end
#end

Original issue reported on code.google.com by kinyelo@gmail.com on 3 Dec 2010 at 9:16

GoogleCodeExporter commented 9 years ago

Original comment by kinyelo@gmail.com on 5 Dec 2010 at 3:41

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1008.

Original comment by kinyelo@gmail.com on 8 Feb 2011 at 9:18

GoogleCodeExporter commented 9 years ago
Implemented getPageResources and getResources methods:

#foreach($fileVO in $service.getResources("/theme/coolblue10/images"))
  $fileVO.title 
  $fileVO.name
  $fileVO.mimeType
  $fileVO.size
  $fileVO.link
  $fileVO.modDate
  #if($fileVO.imageFile)
    Image : <img src="$fileVO.link" /> 
  #end
  #if($fileVO.textFile)
    Content: <pre>$fileVO.content</pre>
  #end
#end

Original comment by kinyelo@gmail.com on 8 Feb 2011 at 9:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
1. When I fetch unicode files from getResources method, they are not displaying 
properly in browser.

2. I have lot of files in a folder. can i directly access one file in stead of 
looping everyone. something like getresources("/data/page/abc.txt")

Please help ?

Original comment by neelam...@gmail.com on 13 Apr 2011 at 9:34