Jump to content

Possible to set a field value for a file that is not used as a template?


bowenac
 Share

Recommended Posts

So I am setting up a file to be used to process data. The url to this template will have post data that I need to do a 50/50 split on what to do with the data. Think of it as a cron job...

Before adding a custom db table which is one way I thought about determining what to do with the data based on if a field is true or false, and after processing the data, update that value to true or false...

Is there a way I can create a custom field and update the value of that field for a custom file that is not used as a template in PW? 

My thought would be to dynamically create the field if the field does not exist... that way I won't need to create the custom field in the dashboard. If the value does not exist create it. This is because I will be using this same template file on 5 different websites which are just different locations for the same website.

So template is cron.php in /site/templates/cron.php I would like to create a field called cron with a value of true or false. After processing the data update the field to true or false.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...