Jump to content

Recommended Posts

Posted

What's the correct equivalent of this?

$foo = new Page();

$foo->name->setLanguageValue($lang, wire('sanitizer')->pageName($value));

I get that 'name' isn't a field like title, etc. and thus doesn't have the setLanguageValue method. I also see where the data is stored in the database. But what is the proper way to set that value via the API?

Thanks!

Jason

Posted

And those ones too:

$foo->setLanguageValue($lang,'name', wire('sanitizer')->pageName($value));

$foo->{"name$lang"} = wire('sanitizer')->pageName($value);

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...