What is the best way to show custom objects on multiple pages?
Hi,
I am building a large portal for one of my customers and is right now expanding the functionality with a ton of custom objects. I am building what resembles a normal CRM with a protected member frontend (a member can login on a custom frontend to see the customers).
Right now i find myself creating one document type (empty) and multiple templates (one for each CRM page).
Show customers
Create customer
Update customer
Delete customer
Create contact on customer
Manage all contacts on customer
etc... (all the CRUD pages)
It got me thinking if there is a better way to manage all these pages. I mean its not very lean and nice code to have all these templates. Also it means that in my backend im building the layout of my CRM with "empty" pages and just selecting the template for each page.
Is this just the way to build these "big" integration projecs with custom objects, or is there more to it?
What would be the better approach to do this. I a normal MVC project I would have a controller and view models. Right now I seem to be getting my data from my Razor.
Generally you'd use Render controllers if you want to customise a view model in the controller. And use Surface controllers if you are using forms to post data to a controller.
So I would still go for one document type. One template per page (and then build a 20 page structure in umbraco backend with different templates). Then connect each page to a custom controller with a viewmodel?
What is the best way to show custom objects on multiple pages?
Hi, I am building a large portal for one of my customers and is right now expanding the functionality with a ton of custom objects. I am building what resembles a normal CRM with a protected member frontend (a member can login on a custom frontend to see the customers).
Right now i find myself creating one document type (empty) and multiple templates (one for each CRM page).
It got me thinking if there is a better way to manage all these pages. I mean its not very lean and nice code to have all these templates. Also it means that in my backend im building the layout of my CRM with "empty" pages and just selecting the template for each page.
Is this just the way to build these "big" integration projecs with custom objects, or is there more to it?
What would be the better approach to do this. I a normal MVC project I would have a controller and view models. Right now I seem to be getting my data from my Razor.
You can still use controllers in Umbraco, if you wish, to handle logic:
https://our.umbraco.org/documentation/Implementation/Controllers/
Generally you'd use Render controllers if you want to customise a view model in the controller. And use Surface controllers if you are using forms to post data to a controller.
So I would still go for one document type. One template per page (and then build a 20 page structure in umbraco backend with different templates). Then connect each page to a custom controller with a viewmodel?
is working on a reply...