adrianmak Posted March 21, 2016 Share Posted March 21, 2016 A template checked with System flag, it cannot be viewable at the front-end. How could I disable system flag for a custom template ? I tried following code, but it didn't work $t = $templates->get("dashboard"); $t->set("flagSystem", 0); $t->save(); The system flag of dashboard template is still checked. Link to comment Share on other sites More sharing options...
kongondo Posted March 21, 2016 Share Posted March 21, 2016 $t->flags = Template::flagSystemOverride; $t->flags = 0; // etc... save here or delete $t->save(); 4 Link to comment Share on other sites More sharing options...
adrianmak Posted March 21, 2016 Author Share Posted March 21, 2016 $t = $templates->get("dashboard"); $t->flags = Template::flagSystemOverride; $t->flags = 0; Not working.....template's system flag is still checked ps I just put these few line of codes on home.php template and executed on home page Link to comment Share on other sites More sharing options...
kongondo Posted March 21, 2016 Share Posted March 21, 2016 Did you save? 2 Link to comment Share on other sites More sharing options...
adrianmak Posted March 21, 2016 Author Share Posted March 21, 2016 Did you save? I see....... Link to comment Share on other sites More sharing options...
kongondo Posted March 21, 2016 Share Posted March 21, 2016 I see....... You mean 'thank you'.... 7 Link to comment Share on other sites More sharing options...
bernhard Posted January 7, 2023 Share Posted January 7, 2023 @kongondo do you know why or when that flag is applied to a field? I'm working on my pagebuilder that will save all field and template settings to YAML so you can use the GUI for everything ? I've edited a template, then created a new datetime field and added it to the template. The field has flag=0. Then I edit the field in the field editor and once I save it it has flag 32768 (flagSystemOverride). It does not seem to do any harm though. But I wonder if there's an issue? Not understanding what is going on is not the best in gerneral ? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now