Accessing app:dictionary from Javascript server code

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2008 11:04 AM
Hi,
I would like to use variables defined for system path (like app:dictionary) for accessing a freemarker template file that is here :
When I try the syntax
it can't find my resource. It seems that it does not translate the variable.
Any idea on how I can do this ? And if this is not possible, what is the way to do it ?
Thank you !
I would like to use variables defined for system path (like app:dictionary) for accessing a freemarker template file that is here :
Data Dictionary/Email Templates/template.ftl
When I try the syntax
companyhome.childByNamePath("app:dictionary/app:email_templates/template.ftl")
it can't find my resource. It seems that it does not translate the variable.
Any idea on how I can do this ? And if this is not possible, what is the way to do it ?
Thank you !
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 12:59 PM
That syntax is known as the "QName Path" to the object - it represents the association names down to the object rather than the "name" path which is based on the cm:name properties of the folders down to the object. If you prefer to use QName path then that is good because it's actually a lot more efficient and you can use a Lucene search using the PATH: operator.
So instead do something like this:
var results = search.luceneSearch("PATH:/app:company_home/app:dictionary/app:email_templates/cm:template.ftl");
See:
http://wiki.alfresco.com/wiki/JavaScript_API#Search_API
http://wiki.alfresco.com/wiki/Search#Path_Queries
Thanks,
Kevin
So instead do something like this:
var results = search.luceneSearch("PATH:/app:company_home/app:dictionary/app:email_templates/cm:template.ftl");
See:
http://wiki.alfresco.com/wiki/JavaScript_API#Search_API
http://wiki.alfresco.com/wiki/Search#Path_Queries
Thanks,
Kevin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 01:07 PM
Thank you Kevin ! That is exactly what I was looking for !
Thanks a lot !
Thanks a lot !
