Jump to content

Page "published" field in database - is it accessible?


Recommended Posts

I am currently running the Processwire 3.x branch (specifically 3.0.36 at the moment) and am back-porting data from a previous website that was created back in 2010. In trying to provide seemingly accurate publication dates to the older articles that I'm manually porting, I was thinking of adding a `published` field to the pages. Upon closer inspection I found that all pages do indeed have a `published` field already (in this version of ProcessWire anyhow). I suspect it was added to core back when ProDrafts was created.

I see that there's a module to handle the ability of providing this field to all pages.

I'm not sure if this is necessary now though if all pages already have an associated `published` date field? Would a module need to be created to expose this database field to the admin side, or is there another way to do this? Would modifying this field cause any detrimental side-effects (I do own a ProDrafts dev license, though am not currently using it in this project).

Link to comment
Share on other sites

Hello BrendonKoz,

I would create a field f.e. date and add it to the needed templates. There is no need for the module mentioned above in my opinion.

Although every page has an internal published field since PW 2.6.16 and I think you could change it through the API, I wouldn't recommend it, because it is used for internal uses. A separate field would be more cleaner and you could also easily change the field or the published dates, if you would like to.

But that is jus my opinion. ;)

Regards, Andreas

  • Like 1
Link to comment
Share on other sites

Thank you for the response, AndZyk!

Do you happen to know what any of the "internal uses" of the published field are? That was mostly my concern, as I think in this case the easiest solution would be for me to manually update that field's data, and is currently what I'm leaning towards as a quick solution. In the future, with this project, access to a published field will be unnecessary.

Link to comment
Share on other sites

  • 2 weeks later...

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

  • Create New...