SimonB
I'm new here

Date a Page was First Generated to Live?

We're implementing a Data Layer for use with Google Analytics and for News Articles we have a "dateFirstPublished" attribute on account on News Articles have an explicit date set by the editors:

https://www.nintendo.pt/Noticias/2016/Marco/Jogos-Wii-U-juntam-se-a-gama-Nintendo-Selects-a-15-de-ab...

"dateFirstPublished": "2016-03-10",

For all other pages we don't have such an attribute but we would like to use the date a page was first generated to Live by Limelight.

Does anyone know if this kind of meta information is stored anywhere in FirstSpirit? We've not been able to find it ourselves.

0 Kudos
4 Replies
kohlbrecher
Crownpeak employee

Hi Simon,

to find the first release (not first generation) you can use the HistoryProvider like this:

import de.espirit.firstspirit.storage.HistoryProvider;
import de.espirit.firstspirit.storage.RevisionFilter;

List<Revision> revisions = dataSet.getHistory(HistoryProvider.UNTIL_NOW, HistoryProvider.EVER_SINCE, HistoryProvider.ALL_REVISIONS, RevisionFilter.RELEASE_FILTER);

Maybe this is acceptable for you.

Best regards

Jan

0 Kudos

Hello Simon,   

do you need further help or did Jan's reply already help you? If so, it would be great if you marked

his reply as "correct answer" so that other community users find the solution easily. If you have

already found a solution by yourself, it would be very kind of you, if you posted it here.   

Best regards 

Sebastian

0 Kudos

Thank you for your suggestion Jan. Your solution isn't quite what we need but it's useful to know about that feature for other purposes.

0 Kudos

Hi Sebastian, Jan's reply didn't help us with what we're trying to do, no. Assuming FirstSpirit doesn't keep track of the date first generated, can you offer advice on how to automatically set such a value for a page template variable?

0 Kudos