Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

link to other documents in the same folder?

Status
Not open for further replies.

huang8012

Programmer
May 19, 2007
3
US
HI there,

I'm new to this board, please bear with me.
I have a html file upload to a folder, within that file,
I want to have a URL link to another file in the same
folder. I assumed that I can simply put <a href="xxx"> to
make that link, since there is no path for "xxx", it will
be assumed in the same folder. But it doesn't work.
How can I find the real URL for that file, so I can use
in the link?

Thanks

H
 
if you look at the source code of the page you are on you will see that each object has a variety of links depending on the action you want to perform, e.g. Open, Edit, Download etc. If you copy and paste the appropriate link into your page you should be ok.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
If you are using Livelink 9.5 or higher, you should always use the Nickname when embedding links to other Livelink objects inside of documents. This makes migrations much easier.
 
If you are using 9.5 or greater you can use the document properties option and copy an 'Open' hyperlink into the system clipboard.

This hyperlink can then be used to make a link to a document anywhere in the system. The nice thing about this is that even if the linked document gets moved, the document can still be opened (in almost every instance, at least).
 
In most livelink's the objectid,dataid of the object(document,folders etc) are the key for any actions on that
object.Typically one could reqrite the open URL as

http(s)//<yourserver>/llisapi.dll?func=ll&objid=<the number of the object>=&objAction=download

http(s)//<yourserver>/llisapi.dll?func=ll&objid=<the number of the object>=&objAction=Open

http(s)//<yourserver>/llisapi.dll?func=ll&objid=<the number of the object>=&objAction=Versions

and this is why a rename/move of the object does not break your links.I beleive if you relocated docs within sharepoint you will have broken links.We also export reports
into excel and put the links as excel formulas so it is easy for the end user to do that.It also avoids browser troubles on interpreting certain escape characters etc when going thru microsoft apps

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Thank all you for the answers. Now the follow up question:
assuming that I need to upload a bunch of files, file A
has links point to file B,C,D,E etc. These files are
created programatically outside of livelink. Is there a way
I can know beforehand what those links(or object names..),
should be for the files loaded to livelink, so that I can build the links in the file A?

I guess I can always manually edit file A, after loading up
all those files, and replace the link with the link I find
from the "source", but it is definitely not something I want
to do.

 
I am not understanding this.If you are at livelink folder A in the web interface,all the children of that folder is listed as hyperlink alraedy for you isn't it.Are you trying to publish the children of a folder in a webpage perhaps and you want that page to dynamically pick up changes,Is that where you are going with this ?

A simple way if at all I understood is to do an xml export of the folder and transpose it with an xslt on your webserver,it will alaways be dynamic then.


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Sorry for not being clear.
Basically, I run some program to generate a bunch of files,
the main one is call a.html, within it, I need to link to
many other files. All these files will be uploaded to the
same folder in livelink. If all of them are loaded into
a webserver folder, I can simply specify something like:

<a href="b">
<a href="c">
<a href="d">

Since they are all in the same folder, webserver can find
them based on the relative path (url?). But I can't do this
if they are loaded into the same folder of liverlink.
I guess if I can know beforehand what's the 'will be' url,
then I can generate a a.html with all the link like this:

http(s)//<yourserver>/llisapi.dll?func=ll&objid for b=<the number of the object>=&objAction=Open
http(s)//<yourserver>/llisapi.dll?func=ll&objid for c=<the number of the object>=&objAction=Open

Now the question is that possible?

Thanks




 
If you are adding these files into Livelink via LAPI or the Web Interface you should be able to determine their IDs from there, either in LAPI or OScript/WebLingo.

Alternatively, if you know the id of your file A, you can ask LL either directly or via the DB to show you a list of all files at the same level in the tree as A which appears to be what you need.

If they are all going into the same folder then you could either add an XML skin to that folder or amend the browse weblingo code to render them differently.

Can you provide some more detail on how you are adding these files to Livelink and why the standard list of items in the folder is not appropriate for your requirements ?

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
This query will give you the children of your starting folder
Code:
select dataid,parentid,subtype,name from dtree where subtype=144 and parentid=<type your starting folderid here>
This is very similar to how livelink constructs the html page.What I think you are missing is LL is a DMS and not a a webserver.In a webserver all files in a virtual directory can be refernced by their relative paths.LL has a bunch of more functionality than a common web server.Hence the need to uniquely identify the objects and so on.The presentaion is where the webserver comes into play,the logic is provided by the app server(ll) and its interaction with the DB.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
You will also need to be aware that although the files may be returned via an SQL statement, they may not be visible to the end user, as the object may be hidden or the user may not have permissions to see or interact with it.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
This is a perfect example of where the Nickname feature of LL should be used. You should NEVER hard code an object ID into an internal URI of a document. You can create the documents using the Nickname path and then set the Nicknames once the documents are added to the system.

This not only removes the necessity of having to know the IDs before adding the documents, it also makes it a ton easier in the case of future migrations. I have a lot of customers that ran across this problem and when they switched all the internal document links to Nicknames, they were much happier.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top