-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
questionFurther information is requestedFurther information is requested
Description
When ZMSIndex was a ContentObj-Lib the doi-Python-Script object
ZMS/Products/zms/import/com.zms.index-2.1.0.metaobj.xml
Lines 1296 to 1321 in 9e4e618
| from Products.zms import standard | |
| request = container.REQUEST | |
| RESPONSE = request.RESPONSE | |
| zmscontext = context.content | |
| path_ = 'index_html' | |
| if request['traverse_subpath']: | |
| path_ = standard.id_quote('_'.join(request['traverse_subpath'])) | |
| catalog = context.zcatalog_index | |
| query = {'zcat_attr_dc_identifier_doi':path_} | |
| rows = catalog(query) | |
| for x in rows: | |
| # ### test #### | |
| # print x['get_uid'] | |
| # print context.content.getLinkObj('{$%s}'%x['get_uid']) | |
| # print context.content.getLinkObj('{$%s}'%x['get_uid']).absolute_url() | |
| # return printed | |
| # ############# | |
| ob = zmscontext.getLinkObj('{$%s}'%x['get_uid']) | |
| RESPONSE.redirect(ob.absolute_url()) | |
| return standard.FileFromData(zmscontext,ob.absolute_url()) | |
| # Return a string identifying this script. | |
| return standard.FileFromData(zmscontext,"'%s' not found!"%path_) |
could resolve short-URls on basis of an attribute like
www.mysite.com/doi/myid
How does it work after the doi()-function has moved with ZMSIndex into ZMS core?
Reactions are currently unavailable
Metadata
Metadata
Labels
questionFurther information is requestedFurther information is requested