Q1. a!dashboardLayout() is deprecated what layout should I use in place of it..
Q2. what was the role of a!dashboardLayout()
Discussion posts and replies are publicly visible
For what use case?
Just a list of components will do it. For real dashboards, it typically use the headerContentLayout.
a!headerContentLayout() is correct or apply another layout in place of dashboardLayout()
There is no hard rule as to what you should use. You can use sectionLayout, formLayout() headerContentLayouts() etc.
I ususally just use a!sectionLayout(). In the old days, you couldn't nest one section within another, so you were forced to use something as the parent container for a section - but now you can nest them to basically any (reasonable) depth. If you don't need a label or any of the other section-specific features, you just don't add them. This has the slight benefit over just declaring an array of components, as in slight extra control (direct control of visibility, other properties, etc).
Same here. I tend to use SectionLayouts everywhere.
To repeat it, there is no need to use a top-level layout component.
But, as these have specific features built in, you should decide which one to take according to your needs. And if you do not need any of these features, just create a list of components.
Hello,
You can use a section layout to do such requirement. And I suggest that it would be better to use a!match() if you have multiple if() conditions when you have to compare the values of a same variable to show desired output.