SID-02088: Open document from wiki Topic
| Status: |
Answered |
TWiki version: |
6.0.1 |
Perl version: |
VM-6.0.1 |
| Category: |
CategoryAddOns |
Server OS: |
VM-6.0.1 |
Last update: |
10 years ago |
Hi,
I am building a twiki to form a knowledge base. However we already have a repository (PDM) with 6years of documents in it.
I want to link to documents in that other system from a wiki topic. Ideally link to a word document would open Word...
Is that possible?
Thanks.
--
Sebastien Digard - 2015-07-15
Discussion and Answer
There are two steps.
- The first one would be to create the links to PDM. If the documents are already available as URLs like
http://some/incredible/long/path/to/PDM/foo.docx or http://some/query?docid=foo.docx, then have a look at InterwikiPlugin. Add an appropriate alias for PDM, and you can write PDM:foo.docx in your TWiki pages.
- The second step is automatic: A link to a word document in a TWiki page will open Word (on Windows) per default browser settings, provided that PDM sends the document with an appropriate MIME type. TWiki isn't involved in that step.
--
Harald Jörg - 2015-07-15
Thanks for your answer Jorg.
I am working on getting a URL from PDM. But my administrator says PDM has been specially tailored and it won't be easy.
As a second option can we imagine the following:
- PDM is installed on every computer. you access it with Win explorer using a path like C:\EPDM\Vault\PathToFile
- The path might be different on each computer, but 'Vault\PathToFile' is always the same
- So, can I ask my browser to look into the host computer for the EPDM location adn then open the file?
- if so how can I automate it from a TWiki link?
--
Sebastien Digard - 2015-07-16
Different drive letters for different users means hassles for users and support issues.
If the PDM is on a shared drive on a file server it should be possible to expose the whole directory tree via HTML. If your file server is Linux it is a simply matter of adding an apache configuration file that defines the PDM folder as an HTML document root. If your file server is on Windows you can do the equivalent using IIS.
--
Peter Thoeny - 2015-07-16
I am still uncertain whether PDM is a program (otherwise a statement like "specially tailored" doesn't make much sense) or if it is just a tree of static files. There's a lot to be said about distributing static files with regard to lifecycle management, and Peter's suggestions are the recommended (and usual) solutions to this. I'll just add some cents about how to do it the TWiki way:
- Option 1: Create a topic for PDM, and install the whole PDM tree in the
pub directory of this topic (sysadmin authorization required). Then you can just link to individual files using normal TWiki techniques and links. If files haven't been attached to TWiki topics in the traditional way, there's no attachment table (though this can be configured), and there is no version control and no metadata, but I guess that in your case this is irrelevant.
- Option 2: If you are using Internet Explorer (Firefox prohibits this for security reasons), users can link to local files like this:
- If the drive letter is different for every user, each user has to define it as a user preference in their user topic like this:
- In your Main preferences, set the complete path:
- Set PDMPATH = file:///%PDMDRIVE%/Vault
- And then link to your files like this:
If, however, PDM is a program, then the work has to be done between your local browser and PDM. TWiki can't invoke a program on your computer (that would be pretty scary), it only can give hints about a file's location (as URL) and how to handle it (as MIME type). That's how links to PDF and MS-Office files usually work: The corresponding MIME types are looked up by the browser in its local configuration, and if there's an appropriate program configured, the browser will fire it up, feeding it the data behind the URL.
--
Harald Jörg - 2015-07-17
Hi Guys,
Thanks for your inputs. I had to twist some hands but I managed to have the
InterWiki link to PDM setup.
--
Sebastien Digard - 2015-07-22
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.