Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Link to a document from a custom query View modes: 
User avatar
Member
Member
vcarter - 7/25/2013 3:07:11 PM
   
Link to a document from a custom query
I generating a list of locations from a custom query, this location data is part of a document type called facility. I am trying to link to the facility detail information but I am not sure how to get the correct URL. I am assuming since I am not referencing the content list directly via a path option, document methods are not available to me. Is there a way to reteive the link to my facility document along with the other information of my custom query?

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 7/25/2013 4:52:04 PM
   
RE:Link to a document from a custom query
What's your content tree look like, meaning what is the document type you are displaying and where or what document are you trying to link to?

And do you have examples of what your URLs should look like?

User avatar
Member
Member
vcarter - 7/25/2013 7:11:19 PM
   
RE:Link to a document from a custom query
I created a document type called fact sheet, it has location and general information about company facilities, it doesn't inherit anything from any other types.

Because of the way they want the list of fact sheet locations to be displayed(all of the information is associated with one document type, they just have the listing page displaying location information), I am using a custom query ti retrieve all of the relevant data including some information being joined to from a couple of other tables. I was going to use a nested repeater and just reference the fact sheets using the path setting, but the additional information made that unruly.

So my plan was to have parent pages(in this case geographic regions) and then just place the relevant fact sheet locations under each parent, setting the where clause to filter the data being returned via my query. So the tree looks like this

North America
Fact Sheet 1
Fact Sheet 2
Asia
Fact Sheet 1
Fact Sheet 2

Region being an attribute of my fact sheet document type. So in the past I have used a simple repeater with a default and preview transformation for new items, and I had hoped to set something like that up for this. However I do not think that is possible since I am using a query as opposed to a path to generate my list of fact sheets and do not seem to have access to any actual document information, like node ID, document url, etc.

So I am wondering if I can add that information to my query or if I am just not calling it correctly. Does that make sense?