krithika_v
I'm new here

How to get url of a media reference object in data source table using First Spirit Integration?

Hello,

I have the below requirement:

I have a table in the datasource with "ref" column where the reference object to a medium is stored.

In the template, The data is retreived from the table using First spirit Integration (fsi) dynamically.

Now the requirement is that the media has to be displayed in the form of href link in the page.

How can this be done? How to get the url of the ref object?

Thanks & Regards,

Krithika

Labels (1)
0 Kudos
5 Replies
fehr
I'm new here

Re: How to get url of a media reference object in data source table using First Spirit Integration?

With FS Integration you are running in your application server context and I think you can't resolve the media object or the url of it because the Module does not have a connection to the FirstSpirit server itself, only to the database.

In the database there is only the reference name.

If you want to have the url in your live files, you have to find a way to fetch the url during generation time. There are a few ways to achieve this, but this depends on your use case.

Maybe you can describe your use case?

0 Kudos
nikb
I'm new here

Re: How to get url of a media reference object in data source table using First Spirit Integration?

Sorry, I don't know what happened, but the reply above was from me, and not Markus Fehr?!

0 Kudos
andre
I'm new here

Re: How to get url of a media reference object in data source table using First Spirit Integration?

Niklas Bulitta wrote:

Sorry, I don't know what happened, but the reply above was from me, and not Markus Fehr?!

seem to be the same problem described in this post (https://community.e-spirit.com/message/10263#10263)

0 Kudos
fehr
I'm new here

Re: How to get url of a media reference object in data source table using First Spirit Integration?

in fact it wasn't me - strange system behaviour 😉

0 Kudos
krithika_v
I'm new here

Re: How to get url of a media reference object in data source table using First Spirit Integration?

Hi,

Thank you very much for the reply. I think this makes sense in my case.

Earlier, in our table, we get the URL of the media from the reference during the generation time and store it in the table and delete the reference.

But then, we have a problem that when a media is moved to another folder, the reference is lost as the url is still pointing to the old location.

Hence we decided to keep the reference object itself.

But now we cannot get the url from the reference object with fsi.

So, May be one solution is to store both the URL and the reference in the table . And update the url during the generation time!  Or is there any better way to do this?

Thanks & Regards,

Krithika

0 Kudos