Folder Widget override document open
Hi
We're using Folder Widget in our external app. Something like this
//csui/integration/folderbrowser2/folderbrowser2.widget var browser = new FolderBrowserWidget( { connection: serverConnection, start: {id: FolderDataID } }); browser.show({placeholder: '#content'});
In Content Server the default click on the documents is configured to open Overview page.
This way it also works in the widget. Is it possible to override that? Instead it would Download the document or open (viewer)
By using .extend or similar method? Within the widget code
csui/utils/commands/open
Thanks
Comments
-
This is configurable on the Admin pages, have you checked what setting you have and what impact it has on the Smart UI ?
0 -
does it change in SmartUI if you change it in the Admin pages ? If it does and you have OScript experience you can probably patch the code to return the appropriate value for the activity you require without needing to touch the SmartUI code.
0 -
the change in admin pages affects both - generic smart view UI (the main interface for users) and also in the widget that is embedded in other apps.
At the moment the default link is Overview page for documents.
This is how it should stay there.
But we need different behaviour in the widget in the external app. We want to have it Edit / Download there0 -
@Uldis then the idea is to look where in OScript that setting is loaded, and then add an if statement around it so in most cases it returns the value from the Admin pages, in your specific cases it returns the other value you want and then Classic UI and Smart UI all work as normal with no additional code changes.
0 -
Uldis- in the Smart View SDK documentation (at least 22.3 has it), might be worth looking at the docs and /doc/csui/utils/commands/open.document/csui.open.document.delegates.html
The following boolean flags can be passed to this module inside the
config
object withrequire.config
to set global command preferences:allowPerspective
: Enforce navigation to the document perspective instead of opening the document content. The default isfalse
.allowViewContent
: View the document content using the best-fitting content plugin. The default istrue
. This can be used to forbid viewing the document content globally and enforce only its download.
Example
Prefer navigating to the document perspective. (Opening the content will never take place, because the document perspective is always available.)
require.config({ config: { 'csui/utils/commands/open.document/csui.open.document.delegates': { allowPerspective: true } } });
Haven't tried it, but wonder if you set allowViewContent to false where you set up your embedded widget whether this would at least force download of the content rather than whatever the default action is per admin page config.
Also - /doc/csui/integration/folderbrowser2/folderbrowser2.widget.html#executingdefaultaction might be worth a look
0 -
Code changes that @David Henshaw is saying gets done in a SmartUI extension project.The SmartView code is all Jave Script but for CS to get it one uses a CS Module(oscript).This is explained in the "getting Started" of the SmartUI SDK.
0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 103 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax