3

We are using Tridion 2011 SP1 HR1 and New UI.

We would like to generate new UI JSON tags using our Java framework based on the Java content delivery API: Tridion delivery framework (TDF).

The JSON tag for the page should contain the PageTemplateModified parameter.

<!-- Page Settings: {"PageID":"tcm:48-84852-64",
    "PageModified":"2013-02-28T15:04:30",
    "PageTemplateID":"tcm:48-24343-128",
    "PageTemplateModified":"2013-02-27T17:11:31"} 
 -->

But when a Tridion page or a Tridion page template is published to the broker database, the zip sent to the deployer does not contain any information about the page template. In the broker DB, ITEMS table does not contain any rows for page templates.

It is easy to verify using the following SQL query on the broker DB:

select * from items where item_type = 128

Is there a reason, why?

[edit]

I am speaking about system metadata.

Chris Summers
  • 10,153
  • 1
  • 21
  • 46
Alex M
  • 33
  • 4
  • That sure sounds like a messed up configuration (cd_storage_conf) OR a missing license file. Metadata for pages & components must end up on the db or they don't exist. – Nuno Linhares Mar 01 '13 at 12:14
  • Hi, Metadata for pages and components are ok. Even metadata for "Component templates". But metadata for "page templates" are not published apparently. – Alex M Mar 01 '13 at 15:18
  • Nuno, I think the confusion comes from the fact I used the term "metadata" and not "system metadata". – Alex M Mar 01 '13 at 16:00
  • Indeed, that threw me off - but I should have seen the item type you used (128)... Sorry about that. – Nuno Linhares Mar 02 '13 at 08:29

2 Answers2

4

This is very subjective,and not really a fit for Stack Overflow consider asking it at https://tridion.stackexchange.com/grant-beta-access?key=63880f9cbf452c62f726770209533893

I think the only way you will be able to get the modification date of a PT into your rendered page output would be to add the data to your page (or page meta) at publish time.

To answer the Why? Part of your Q, probably nobody thought of a reason for it, so it was never designed that way.

Community
  • 1
  • 1
Chris Summers
  • 10,153
  • 1
  • 21
  • 46
  • Hi, thanks for your quick answer. I'll take care next time to put this kind of question into stackexchange instead. The "why" was because, if there are no metadata for page template, this is a bit in contradiction with the possibility to create fully the New UI tag on the Content delivery side. (and not at publish time). – Alex M Mar 01 '13 at 15:18
  • The metadata is on the page, not the PT - Perhaps you can explain why you need the PT modification date, and why you can not just add that to the metadata of the page. – Chris Summers Mar 01 '13 at 15:38
  • I edited to give an example of a page tag in the new UI and to mention that we are speaking here about system metadata. – Alex M Mar 01 '13 at 15:58
  • Hi Alex, the DD4T framework (which is another delivery framework for Java and .NET built on top of the broker) has solved this by publishing the modification date of the page template along with the page as XML. I don't know if that would be possible with your framework, but maybe you can use that same approach? – Quirijn Mar 01 '13 at 16:00
  • Hi Quirijn, You gad the point. :) I saw this page before to ask: http://code.google.com/p/dynamic-delivery-4-tridion/source/browse/trunk/dotnet/DD4T.Mvc/SiteEdit/SiteEditService.cs?r=292 This is why I was a bit surprised. I understand better now how it is done on DD4T. We are based on CWA, so no big deal to create a "caculated custom meta" at publish time to add it to page's custom meta. But then the problem is if (for any reason) the template modification date changes in BO, we have to republish all related pages. This is why I expected a native behavior of Tridion about this. Thank you guys – Alex M Mar 01 '13 at 16:37
1

I was going to reply to the thread under Chris' answer, but it became too long...

The Last modified date setting in the XPM JSON cannot be the real last modified date, and I'll explain why.

When you load Experience Manager, it will quickly go through the various ""LastModified" settings in the JSON to compare with what is stored in the CM and determine if your page is up to date. If you published this page in December last year, then modified the template in January, the dates should not match - and XPM will let the editor know that "this page is not up to date, click here to reload".

If you would now change that last modified date "on the fly" to be the real last modified date of the template as opposed to the last modified date of the template at the time this page was published then XPM will not detect that there was a change made to the template on the CM and the editors may have unexpected results, like changing the value of a field, reload, and suddenly their sidebar is on the left instead of being on the right.

Hope this helps

Nuno Linhares
  • 10,214
  • 1
  • 22
  • 42