Open jo3stevens opened 4 years ago
This may actually be a Sitecore 9.2 issue and not a Glass Mapper issue. I found that 'Html.Sitecore().CurrentRendering.Parameters' doesn't return any params for the shared layout, but when I make a change on the final layout it does.
Thanks for the updated. Are you able to ask Sitecore support, if this is a known issue?
Hi @jo3stevens & @mikeedwards83,
We are encountering a very similar issue on upgrading from Sitecore 9.1 to Sitecore 10.1.The solution has been upgraded, and we updated the Glass nuget packages to Glass.Mapper.Sc.101 (v5.8.177).
Please can you share some details on how you were able to fix this issue.
Thanks, Amar
I'm in the process of upgrading from Sitecore 9.0.2 to 9.2. The solution has been upgraded, and I updated the Glass nuget packages to Glass.Mapper.Sc.92.xxx (v5.6.160)
We have a base page with a shared layout on the standard values for common components (header, footer, breadcrumbs etc). Some of these component have rendering parameters.
We're using view renderings which have a line at the top to retrieve the params: '@{var parameters = Html.Glass().GetRenderingParameters(); }'
Before the upgrade this was working as expected, but post upgrade this line always returns a null when the rendering is on the shared layout.
If I modify the rendering params on a particular page on the final layout then the parameters are retrieved successfully.