Jump to content

PrependFiles and AppendFiles not working for user pages


bee8bit
 Share

Recommended Posts

Hi!

I'm using MarkupRegions and it works great. But when I try to render a user page (as in /admin/access/users/my-user/) the template file user.php is rendered without MarkupRegions.

PrependFiles and AppendFiles seem to be ignored, no matter if configured globally or on the template level. Is this because user is a system template? I couldn't find any special treatment in the sources yet.

Or is it a bad idea™ to make these pages accessible?

Link to comment
Share on other sites

2 hours ago, bee8bit said:

PrependFiles and AppendFiles seem to be ignored, no matter if configured globally or on the template level. Is this because user is a system template?

Yes. More info here:

 

2 hours ago, bee8bit said:

Or is it a bad idea™ to make these pages accessible?

Rather than try and render the user template you can create a separate template for the profile page and...

  • Get individual fields with $user->some_field
  • Get all fields with $user->getInputfields()
  • Get an array of named fields with $user->getInputfields(['some_field', 'another_field', 'field_the_third'])
  • Like 3
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...