Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 12 2020 01:41

    jtkech on patch-1

    (compare)

  • Apr 12 2020 01:39

    jtkech on patch-1

    Update ZoneShapes.cs (compare)

Sébastien Ros
@sebastienros
got an idea. In your controller, pass the shape to the view as the model
in the view call await DisplayAsync(Model)
but also add this at the top: @{ ThemeLayout = null; }
Steven Spits
@netwavebe
@sebastienros That would probably work, but is not useful in my case. I'm trying to do this in an api controller. Need to return JSON: products with data and some html fragments.
Sébastien Ros
@sebastienros
I made a graphql endpoint for rendering content items, maybe the solution is there
can't remember if there was layout or not included in it
looking for it...
Niraj Soni
@ns8482e
Create theme selector based on RequestPath
Steven Spits
@netwavebe
@ns8482e Feels really hacky. It shouldn't be this hard to get the html fragment a single content item would render (assuming it's not using zone/placement/...).
Sébastien Ros
@sebastienros
I believe the theme is not applied if it's not a controller. Can you try putting your code in a middleware endpoint?
or we might have to implement this Themed(false) attribute. Not hard though, it would set a scoped property that is checked where the layout is applied. Or it could use a Theme selector and this attribute
Steven Spits
@netwavebe
@sebastienros Moving it to a service and injecting all services is not enough. But of course it's still the controller calling this service.
@sebastienros Much harder than I anticipated, might be better to look at other solutions (send everything as data and make a similar template in Angular).
Niraj Soni
@ns8482e
another option is to implement ActionFilter
and assign Theme to null for RazorViewFeature
Jasmin Savard
@Skrypt
@sebastienros Yes it renders the entire layout
The GraphQL render method
Niraj Soni
@ns8482e
I have same issue with BlazorServer
Jasmin Savard
@Skrypt
So BuildDisplayAsync does what I thought. It renders all the small pieces from .cshtml templates. So, it's just about rendering the HTML and Body tags or not.
But at the same time then, some things might not work if you want a script rendered at header.
Because we render these scripts and styles on the header of the page.
So, returning the content of the BuildDisplayAsync without theming or scripts but if you have scripts that are rendered at head then you don't have a Layout to include them after the Body tag for example.
So, I guess in that case the best option is to use an alternate Layout
Jasmin Savard
@Skrypt
Which doesn't contain any HTML and Body tag.
Jasmin Savard
@Skrypt
Okay then from a GraphQL API call then you can parse the DOM result and keep only everything inside the Body tag since you might be requesting this from a javascript call.
Or we should be able to pass a param that says use X layout.
Jasmin Savard
@Skrypt
I think @sebastienros knows what to do here
Steven Spits
@netwavebe
@sebastienros @Skrypt I'll continue this in OrchardCMS/OrchardCore#5687
CrestApps
@CrestApps
Is there a helper to create a link for listing a specific content type?
1 reply
Jasmin Savard
@Skrypt
cors?
1 reply
CrestApps
@CrestApps
Is there a reason why typeof(Controller) instead of ControllerBase? https://github.com/OrchardCMS/OrchardCore/blob/339d74b251b53393dd510f8ad3027aa17d78500d/src/OrchardCore/OrchardCore.Mvc.Core/Utilities/ControllerTypeExtensions.cs#L10 . When creating an API controller, one would using ControllerBase not Controller
Josiah Nunemaker
@JosNun
Is it possible to have a content item with "child" content items? In my case, I want all the configuration for a multi-step process to be in one location, but don't necessarily want all the fields on one page.
11 replies
Sébastien Ros
@sebastienros

@/all we have released on the cloudsmith feed the packages that we intend to ship for 1.1.0.
To test them you need to add this url in your nuget.config with <add key="OrchardCore" value="https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json" /> , and reference OrchardCore packages with version 1.1.0-preview-16522

As soon as enough people have verified these packages work, I'll publish them on NuGet.
Testing means going through the Setup, testing some features work, and ensuring our guides from the documentation work too.

Thanks

Jasmin Savard
@Skrypt
:rocket:
Andrii Chebukin
@xperiandri
👏👏👏
Any thoughts?
Josiah Nunemaker
@JosNun
Judging by this Issue, OrchardCMS/OrchardCore#6784 would I be correct in assuming that there's currently no way to place a named part with a placement?
13 replies
Antoine Griffard
@agriffard
http://try.orchardcore.fr/ now running on 1.1.0-preview-16522 if you want to test.
pbull001
@pbull001
Can a workflow activity issue a HttpRequest to an secure api? Example, an secure api created in a module.
pbull001
@pbull001
When a workflow is triggered under what user context does it execute? For example, trigger = ContentCreated, does the workflow execute in the context of the user who created the content? How does it work with timer trigger event?
Jasmin Savard
@Skrypt
ok had enough fun with these this morning : https://gitmoji.dev/
tlowe0728
@tlowe0728
We are looking to move from the current CMS we use to another framework and I want to review Orchard Core CMS. I followed the instructions in the video (https://www.youtube.com/watch?v=3pPyNKJo1iU) and created two types of web sites by choosing the Recipe on the setup screen. It compiled and ran without errors but the site doesn’t appear to be using the theme. I did the BLOG one most recently, because that was the one chosen in the video, and in the video you can see the BLOG images and menu but my site is a white screen and only contains text and links. Am I missing something? Any help would be appreciated. I am using Microsoft Visual Studio Professional 2019 Version 16.11.5 and OrchardCore.Application.Cms.Targets v1.0.0-rc1-13433.
Sébastien Ros
@sebastienros
OrchardCore.Application.Cms.Targets v1.0.0-rc1-13433 is very, very old. Use 1.0.0 instead.
1 reply
here is a very simple "Getting Started" guide https://docs.orchardcore.net/en/latest/docs/getting-started/
@agriffard we should have done some of the changes in release/1.1 instead of main, like the docs, since now the documentation references 1.1
So I am releasing 1.1 now, nobody complained, and you deployed in on try.o.fr