Jump to content

Field created/modified dates?


onjegolders
 Share

Recommended Posts

Maybe I am not getting your point, but I just tested this:

$p=$pages->get("/about/");
$p->headline = "test";
$p->of(false);
$p->save("headline");

and the page's modified date gets changed, just like it would if you saved the entire page. Are you getting different results, or am I off base on what you are trying to do?

Link to comment
Share on other sites

Adrian, I think Andre wants the date when the field (not the page) was added or modified. So, when was 'headline' added, for instance :-). The page could change subsequent times before and after, but he wants the time for this one particular field. I don't think this is possible out of the box?

  • Like 1
Link to comment
Share on other sites

That makes sense - I thought I must have been missing something :)

Yeah, most fields don't have created/modified db fields. Files/Images fields do - if you look at the DB structure they have both created/modified fields, although interestingly those fields don't exist on a new install - they get added the first time the field is used.

So yeah, I think the easiest option would be to create another field to store that.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...