How to create profile like page with multiple tabs? #8210
Replies: 2 comments
-
With a first attempt, I though each tab would be generated using a different driver. Each driver will need to create a profile header, page tabs, and tab content. Eventually, I'll create a base driver that would generate the header and the tabs to reuse my code. If this a bad approach? if so, what would be the right approach?
The controller looks like this
The The
The The
Finally the
Everything seems to be rendering correctly. But, before I spend the time cleaning it up. Is there a better approach to this? I believe there is at least a better way to handle navigation by using Navigation Providers "some how". Any help on how to make this better? |
Beta Was this translation helpful? Give feedback.
-
About local navigation using TABs see my answer in #8237 See also the docs about groupings using TABs / CARDs / COLUMNs, e.g. to see how to define a location string for a given zone, position, tab name, and so on https://docs.orchardcore.net/en/dev/docs/reference/core/Placement/#supported-groupings |
Beta Was this translation helpful? Give feedback.
-
I want to create a profile like page with
When a user click on a tab, a request is sent to the server to render the corresponding content along with the Header and Navigation.
The output will look like this
What is the best way to go about creating a client profile?
To start, I created a
ClientDisplayDriver
like soI also create all the needed views to render the
Header
,Navigation
and theContent
zones.In my
ProfileController
I create Overview tab which uses the above driver to a create all the needed shape results.The above code is working and is rendering correctly. However, I now want to add Addresses tab to the profile. In order for this to work, I somehow need to call create the navigation shape and the header shape from
_clientDisplayManager.BuildDisplayAsync(client, this);
in addition to a shape-results for the address content and addresses tab.Question, how can I combine the shape results from 2 or more driver into the final shape being passed to the view?
Beta Was this translation helpful? Give feedback.
All reactions