Global Properties in Templates?

Most of the pages in my application are Store specific. I'd like to retrieve the last "store" during login from the user record during login and cache that in a global property. The Store selector is a dropdown that lives in the template so it's consistent across pages. Next step is to make each page use the selected store when retrieving/displaying data.

Are these global properties available when the template loads? I'm just starting to poke around and I'm getting errors:
"error CS1061: 'GlobalService" does not contain a definition for 'SelectedStore' and no accessible extension method 'SelectedStore' accepting a first argument of type 'GlobalService' could be found..."

Hi @ToddB,

You want to set a property in the MainLayout and access it from all application pages? We will add support for that in the next update before the end of this week.

2 Likes