Search the FirstSpirit Knowledge Base
Hi everybody!
I have a page like so:
http://www.nintendo.co.uk/Games/Nintendo-GameCube/Resident-Evil-4-268665.html
All the information that appears in the right-hand column (game cover art, system type, release date, genre etc.) is stored in a datasource, the record is referenced by the page.
The cover image has this final URL:
What I'd like to do:
Store the full final URL of the cover image in the same datasource as the other game data.
My question:
Is this possible? And if it is, how can I do so?
Vielen dank,
Simon
Hi Simon
it looks like the image is delivered from a CDN system.
You can easily create a CMS_INPUT_TEXT field which contains the url. The maintaining editor could enter the final URL in this field. This won`t be any problem as long as the editor knows the final URL.
Gets the CDN filled with media from FirstSpirit or are these images completely external?
Does this solution fit you needs? If not, it would be helpful if you explain the usecase in more detail.
Regards
Rouven
Hi Rouven,
Thanks for replying, I've just come back to check the forum is why my late reply.
The solution you propose would work on a small scale, but what I need is an automated one; we have ~2000 games per locale, across 11 locales, so over 20,000 images that this needs to be done for.
The images are stored and set in FirstSpirit, they get sent to the CDN as part of generation.
What I need is an automatic way of storing this CDN path in the datasource for the associated page at generation time.
I hope that helps clarify what I'm looking for.
If you store the generated image url in the database you create redundant information. And it's a well known rule of thumb that redundant stored information will diverge. So I suggest you use the API method "getStoredUrl" to retrieve this information.
Out of curiosity: Why do you want to store this information?
Hello Peter,
Thank you for your answer. Unfortunately, the API method is not an option, since in that case, we would have to build up a new interface between FirstSpirit and our Java Application.
The images we need the URL's from are assigned to rows in a FirstSpirit database table (like products). We want to show different products per user on our webpage. However the information which products we show to user is not stored and will not be stored in FirstSpirit.
Hopefully this clarifies things a bit more.
Dirk
Sorry, I still don't understand your problem
All the information that appears in the right-hand column (game cover art, system type, release date, genre etc.) is stored in a datasource, the record is referenced by the page.
And
The images we need the URL's from are assigned to rows in a FirstSpirit database table (like products). We want to show different products per user on our webpage. However the information which products we show to user is not stored and will not be stored in FirstSpirit.
The Datasource is requested "live" (i.e. from the website)?
Even if so, is don't understand why "the API method is not an option, since in that case, we would have to build up a new interface between FirstSpirit and our Java Application".
After the editor has set (added?) a new image to the "game record", this record has to be released. During the release process the referenced image should be released and deployed (so that it is accessible from the website). Then you could then store the final "live URL" of the image in the "game record".
Hi,
we don't use the FirstSpirit release process.
How can we identify which record was changed by an editor ?
I know of storelisteners but what I've heard from the storelisteners in the datasource is that we don't get the specific changed row(Entity or Dataset) instead the storelistener receives a "Content2"-Object which doesn't help that much.
The "getStoredUrl"-method is not available in our FirstSpirit Version (4.2.454.47473).
The only goal we have is to receive the final rendered image URLs so that we can use them in another application.
Kind regards,
Jan
The other application is requesting the FirstSpirit database?
Then I would recommend a "batch job" which deploys the referenced media files and fills the url into the corresponding database field.
The job can e.g. filter all datasets where a picture is set but the url field is not yet filled, calculate the url (using this and this method) and store it.
Thanks for your feedback, Peter. We went with a solution that's outside of FirstSpirit, but it was useful to see what was possible within it.