Topics

Tribe Support

Tribe Support's Topics

Nick Swinford

Nick Swinford

May 14 2017

How can I display the login for in a template file?

I want to display the login form in a template file in a custom component, but every thing I've tried so far has given me an error. Currently, I have:

Loading ...

If you don't set the format, you get an error about the user not being logged in. It currently returns a form template not found error.

Any ideas? Thanks.

At this point perhaps just duplicate the form in your component. To make the form reusable we need to define it as a ui element. You are trying to access it via the session controller and that could really complicate things.

Any reasons you are duplicating the login form? You can redirect guest users to the form and then return them back to where they were in your component once they're logged in.
I'm building an component where a user can either login or continue along as a guest. If that's not possible currently, I think I'll just provide links to the login page.
Rastin Mehr liked this
Isn't one of the big features of Anahita/Nooku Hierarchical MVC? That you can call any component from within another component?
That's not what the HMVC is about. HMVC is when a component can be extended by other components and form inheritance. Dispatching a controller within a view is possible, but not recommended, because it is quite resource intensive and prone to errors.

Powered by Anahita