These are chat archives for OrchardCMS/Orchard

18th
Nov 2016
Hermes Sbicego
@HermesSbicego-Laser
Nov 18 2016 09:27
plaese @sebastienros , can you reopen #5533 (because of #7385) so we can work on it? At the moment both issues are closed, tnks...
Subrata Sarkar
@emfluenceindia
Nov 18 2016 10:14

For my custom theme I have created a shape called CategotyList.cshtml. I want to dynamically add this in zoneAsideFirst. My Theme.txt has the definition ofAsideFirstzone. InLayout.cshtml` I wrote the following line:

WorkContext.Layout.AsideFirst.Add(New.CategoryList(), "1"), but the content inside the view is not showing up. But when I change this to WorkContext.Layout.Header.Add(New.CategoryList(), "1"); it does show up.

My markup of Layout.cshtml looks like this for AsideFirst null check:

@if(Model.AsideFirst != null) { @Zone(Model.AsideFirst); }

What is wrong in my code?

mhodorogea
@mhodorogea
Nov 18 2016 10:39
@emfluenceindia Maybe because you have missed the file name ? CategotyList.cshtml -> CategoryList.cshtml :)
mhodorogea
@mhodorogea
Nov 18 2016 10:45
By the way, does anybody know how can be created session variables in the workflow? Is this possible ?
Hermes Sbicego
@HermesSbicego-Laser
Nov 18 2016 10:50
@emfluenceindia there is a typo in your cshtml
Hermes Sbicego
@HermesSbicego-Laser
Nov 18 2016 11:29
Hi guys anyone knows if in a ContentHandler.OnUpdated I could call a sort of validation and then Add a model Error?
Carl Woodhouse
@carlwoodhouse
Nov 18 2016 11:47
why in a handler as opposed to a driver?
Subrata Sarkar
@emfluenceindia
Nov 18 2016 11:48
@mhodorogea Thanks for pointing this out.. LOL I am sorry :D
Xceno
@Xceno
Nov 18 2016 14:17
@mhodorogea do you mean the workflow-session or the http session?
You're probably searching for workflowContext.SetState<T>() ?
mhodorogea
@mhodorogea
Nov 18 2016 18:08
@Xceno thanks for sugestions. I will try this out ;)