I'm having some issues recovering a Tridion component content in a controller in my DXA project.
The component schema is called AutocompleteResults and it has 2 fields:
- hotels: Component Link of Hotel (a schema including name, category, email... and other text fields) allowing multiple values.
- destinations: Component Link of City (a schema including name and country) allowing multiple values.
I created some components using the schema Hotel and some using City. Then, I created a component AutocompleteResults using the schema AutocompleteResults, and added the hotel and city components as component links.
I also created a component template adding "Default Component Template Finish Actions" and "Render Component Presentations" and vinculating the schema AutocompleteResults. I configured it like this:
I also created a page template Autocomplete adding "Render Page Content" and "Default Page Template Finish Actions" and configured it like this:
Then, I created a page Autocomplete inheriting from the above page template and adding the presentation Component/Component template created before.
I have published the page, publish settings and components (this last ones just in case), but I can't get the information in my DXA .NET project.
This is the controller and the action I created, but entity is not being populated:
The view AutocompleteResults referenced in the component template is also created, and it's registered in the CoreAreaRegistration (I've tried also without the last parameter "Page").
The model AutocompleteResults has the same structure as the schema of the component in Tridion:
Could anyone help me to see what I'm doing wrong?
Thanks a lot!