Jump to content

Recommended Posts

Posted

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.

Posted
$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

  • 6 years later...
Posted

@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 ? 

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
  • Recently Browsing   0 members

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