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)

Jasmin Savard
@Skrypt
You are missing some using in you _viewImport file
Kevin Welsh
@kdubious
in my razor page:
OrchardCore.DisplayManagement.Razor.IOrchardDisplayHelper _orchard;
        public DemoModel(OrchardCore.DisplayManagement.Razor.IOrchardDisplayHelper orchard)
        {
            _orchard = orchard;
        }
Oops, OrchardCore.IOrchardHelper
Kevin Welsh
@kdubious
Have you seen this before: No service for type 'OrchardCore.DisplayManagement.Razor.IOrchardDisplayHelper' has been registered.
Kevin Welsh
@kdubious
Your browser sent a request that this server could not understand
;(
hours
I can't work out why I'm not able to POST JSON to an Action
Kevin Welsh
@kdubious
[IgnoreAntiforgeryToken] (F*CK)
1 reply
Kevin Welsh
@kdubious
ok, Lucene query: I need OR for Terms in a Taxonomy, and AND across Taxonomies. So If I pass in: Kids (age), Teens (age), Poetry (genre)... I'm looking for "(kids of teens) and poetry"
Kevin Welsh
@kdubious
And, with help from @Skrypt , here it is:
{
    "size": 10,
    "query": {
        "bool": {
            "must": [
{% if genres %}
                {"match": {
                    "Book.Genres": {
                        "query":"{% for genre in genres %}{{genre}} {% endfor %}",
                         "operator": "or"
                          }
                    }
                },
{% endif %}
{% if agegroups %}
                {"match": {
                    "Book.AgeGroups": {
                        "query":"{% for agegroup in agegroups %}{{agegroup}} {% endfor %}",
                         "operator": "or"
                          }
                    }
                },
{% endif %}
{% if geographies %}
                {"match": {
                    "Book.Geography": {
                        "query":"{% for geography in geographies %}{{geography}} {% endfor %}",
                         "operator": "or"
                          }
                    }
                },
{% endif %}
{% if represenationgroups %}
                {"match": {
                    "Book.RepresentationGroups": {
                        "query": "{% for group in represenationgroups %}{{group}} {% endfor %}",
                         "operator": "or"
                          }
                    }
                }
 {% endif %}
            ]    
        }
    }
}
2 replies
Josiah Nunemaker
@JosNun
Are there any special steps / requirements for publishing a module to a nuget repo? I have a module that works fine when I add it as a project reference to my project, but if I add the published version, it doesn't show up in the Features tab
27 replies
Nic Scott
@Nic-84
I have a suggestion to slightly improve the UI on the admin side of Orchard. When you are dealing with media/images, the media picker has a white background (or black background in dark mode). Instead, could you make the background a checkered board, like other image software? I am using transparent pngs/svgs, and it would be nice to be able to see the image when it's either all white or all black. I have included a screen shot to explain what I mean. Should I post something like this on the GitHub site, Discussions > Ideas?
orchard-media-screen.jpg
Kevin Welsh
@kdubious
@Nic-84 yeah, very useful. I've done that on other project with image processing to deal with white logos with transparency
Can also be done with pure css to add a striped bg
Sébastien Ros
@sebastienros
@Nic-84 do you want to create a PR for that? Or at least an issue to entice someone into doing it
Jasmin Savard
@Skrypt
done
1 reply
Kevin Welsh
@kdubious
Nice
Mike Alhayek
@MikeAlhayek
What is the best was to read json files located in a module home folder?
Mike Alhayek
@MikeAlhayek
Way**
Niraj Soni
@ns8482e
i guess inject IHostEnvironment and use ContentRootFileProvider
Mike Alhayek
@MikeAlhayek
@ns8482e the "../" does not seems to work when using ContentRootFileProvider.GetFileInfo()
Mike Alhayek
@MikeAlhayek
ContentRootFileProvider.GetFileInfo("Program.cs") returns the host project path. my module is one level up. so I do ContentRootFileProvider.GetFileInfo("../ModuleName/Program.cs")
and that returns file not found
Niraj Soni
@ns8482e
No nees to use ../
Only embedded files are avilable all module’s root is contentroot e.g ContentRootFileProvider.GetFileInfo("Mysettings.json”)
Greg Finzer
@GregFinzer
Hello all. I am an Orchard noob. I need to an image component for Orchard Core that will randomly pick from images in a folder every 30 minutes and display it. Is this something that already exists? If not, how would I begin to create it?
Richard Garside
@NogginBox
What's the official name that we should call Old Orchard? I'm getting confused when searching for Orchard help/tutorials etc when I see content for the old version of Orchard. So, I was thinking I'd help the situation by renaming my old blog content to make it clear it was for the old version of Orchard.
Dimmy Shu
@dimmyshu
Hi Guys, just wondering if orchard core has documentation for startup sequence order, I want to create elastic APM module, which should start as the first middleware in the tenant level
Dean Marcussen
@deanmarcussen
@dimmyshu it's largely managed by either the Order or ConfigureOrder properties in StartupBase or through taking dependencies in your module manifest. You can adjust your log level to Debug to see the default load order of things, by looking at the order in which migrations run
Dimmy Shu
@dimmyshu
@deanmarcussen noted, just looking to orchard core source code, I'll start to play with ConfigureOrder to control the middleware sequence. Thanks again :)
emil-aleksandrov
@emil-aleksandrov
How do I create a new version of a content item programmatically? Do I use UpdateContentItemVersionAsync or CreateContentItemVersionAsync ?
pbull001
@pbull001
In a HttpRequest tasks, preceded by a OnContentCreate event, is the following url parameter expression valid https://localhost:44300/tenant5/api/Rules/apply/Workflow1/{{Workflow.Input.ContentItem.ContentId}}
1 reply
emil-aleksandrov
@emil-aleksandrov
I tried using UpdateContentItemVersionAsync and CreateContentItemVersionAsync but neither of them create a new version of an item. Can anyone show me a working example?
Josiah Nunemaker
@JosNun

I've been trying to override the Form.Wrapper.cshtml in the OrchardCore.Forms module, but I can't seem to find the proper location to place my override within my module. Things I've tried include:

  • Views/Form.Wrapper.cshtml
  • Views/Widget-Form.Wrapper.cshtml
  • Views/OrchardCore.Forms/Shared/Form.Wrapper.cshtml
  • Views/OrchardCore.Forms/Shared/Widget-Form.Wrapper.cshtml

The location of the wrapper within the OrchardCore.Forms module is Views/Form.Wrapper.cshtml, so if I'm understanding the docs here https://docs.orchardcore.net/en/dev/docs/reference/modules/Templates/#overriding-views and here https://docs.orchardcore.net/en/dev/docs/reference/modules/Widgets/#customizing-the-widget_wrapper-template, one of the above paths should have worked?

Niraj Soni
@ns8482e
@JosNun you can override views from Form module in your theme
Josiah Nunemaker
@JosNun
Can it be done from another module, if my module depends on the module I'm attempting to override? From what I understand, the only difference between a module and a theme (other than what they are indentended to be used for) is that a theme is loaded after all the modules?
Niraj Soni
@ns8482e
If your module has dependency of "OrchardCore.Forms" in manifest .cs then you can override using Views/Form.Wrapper.cshtml
Mike Alhayek
@MikeAlhayek
What is the difference between requiring dependency using mainifest.cs vs using FeatureRequirers attribute in the startup class?
Dean Marcussen
@deanmarcussen
one forces a dependency and module activation, the other activates if the specified module is enabled, but does not force activiation
Niraj Soni
@ns8482e
By defining dependency, when dependent feature is activated, it will also activate the dependency
where as RequireFeatures allows a module to contribute to services/pipeline to other feature without depending on it
e.g when OrchardCore.Feeds is activated it doesn't activate OrchardCore.Content
however if OrchardCore.Content is active, then activating OrchardCore.Feeds will also has services/pipeline related to content management
Josiah Nunemaker
@JosNun

If your module has dependency of "OrchardCore.Forms" in manifest .cs then you can override using Views/Form.Wrapper.cshtml

So this set me off on the right direction. If I create that file in another one of my modules, it works fine, but in the module that the file belongs in, it refuses to work. Both modules show up in the features section in the orchard admin, and work fine otherwise. Both modules also have OrchardCore.Forms listed as a dependency, and both are listed as projectReferences in the csproj for the startup project. Any suggestions for me to try?

4 replies
Screen Shot 2021-10-11 at 12.37.23 PM.png