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 01:41

    jtkech on patch-1

    (compare)

  • Apr 12 01:39

    jtkech on patch-1

    Update ZoneShapes.cs (compare)

Antoine Griffard
@agriffard
weirdyang
@weirdyang
Thank you!
@agriffard , Widget_Wrapper -> this will be named Widget_Wrapper.Liquid in my module project?
Antoine Griffard
@agriffard
I' d say: Widget.Wrapper.liquid, like the cshtml one.
weirdyang
@weirdyang
Ok thank you! will try again
image.png
image.png
I'm not sure if I'm doing it right. Sorry for the trouble
weirdyang
@weirdyang
I'm tryign to deploy a theme as a nuget package. If I reference it as a project, it works as expected. However, after packaging it, the recipe doesn't show up in start up and the layout files etc aren't working.
Are there any modifications I need to make to the themes template?
Antoine Griffard
@agriffard
image.png
weirdyang
@weirdyang
yes it's all embedded resource;
image.png
image.png
weirdyang
@weirdyang
Could it be cos my Theme has "." in the name? e.g Theme.New
weirdyang
@weirdyang
I'm not sure why, but I modified my csproj by movivng the item group for package references to teh top and now it works
Jus
@Jus56288672_twitter
Can anyone tell me how I can automatically assign a basic role to a user after they register? I'm assuming Workflow is the answer, and I tried to do "On User Created -> Assign User to Role" but of course it did nothing and of course Workflows don't provide any feedback or errors. Any help is appreciated
Maybe I did it wrong in the RoleName part of the Assign user to role workflow event. What is the syntax for supplying the role just so I know if that's the problem
kandari7
@kandari7
Hi all, can anyone help me with Graphql error
A field with the name: ContentType is already registered for GraphType: ContentType(Parameter 'Name')
Antoine Griffard
@agriffard
@Jus56288672_twitter Fill the Username property with {{ Workflow.Input.User }} and it should work.
Jus
@Jus56288672_twitter
@agriffard Thank you! That worked perfectly. Is there a reference to the Workflow Input dictionary and the available models i have access to? I have the OCCMS source if it's located in there
Omid Nasri
@omidnasri
Hi all, can anyone help me. How I can use the Feature attribute on ActionResult controller method?
I want to use the Feature attribute on ActionResult, not on the Controller.
Omid Nasri
@omidnasri
Or how I can check Feature is available in action body?
CrestApps
@CrestApps
I have the following Content-Driver. In what view should I be able to access the FeaturedPropertyViewModel object?
public class FeaturedPropertyPartDriver : ContentPartDisplayDriver<FeaturedPropertyPart>
{
    public override IDisplayResult Display(FeaturedPropertyPart part, BuildPartDisplayContext context)
    {
        return Combine(
            Initialize<FeaturedPropertyViewModel>(nameof(FeaturedPropertyViewModel), model => BuildViewModelAsync(model, part))
                .Location("Content", "Tags:1")
        );
    }

    public async ValueTask BuildViewModelAsync(FeaturedPropertyViewModel model, FeaturedPropertyPart part)
    {
        // Do something with viewModel
    }
}
This part is being rendered by a widger view like so
<h1>Widget View</h1>

@await DisplayAsync(Model.Content) @*This should render the viewmodel- somehow*@
CrestApps
@CrestApps
I mean I should be able to create a view where I can use @model FeaturedPropertyViewModel to render my strongly typed shape... What would that view be called and where would I place it?
JimmyLiu7323
@JimmyLiu7323
Hi does anyone know how to upload image from code?
weirdyang
@weirdyang
      An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'Castle.Proxies.ExtendedInputPartEditViewModelProxy', but this ViewDataDictionary instance requires a model item of type 'OrchardCore.Forms.ViewModels.InputPartEditViewModel'.
I'm trying to register a new inputPart,, but I get this error when I try to load a Page content
How shoiuld I go about debugging this?
weirdyang
@weirdyang
        public int Create()
        {

            // Input
            _contentDefinitionManager.AlterPartDefinition(nameof(ExtendedInputPart), part => part
                .WithDescription("Provides input field properties with additional extensions."));

            _contentDefinitionManager.AlterTypeDefinition("ExtendedInput", type => type
                .WithPart("FormInputElementPart")
                .WithPart("FormElementPart")
                .WithPart(nameof(ExtendedInputPart))
                .Stereotype("Widget"));
this is my migration.cs,
weirdyang
@weirdyang
Ok it seems to be a naming thing? ExtendedInputPart throws the arrow, but renaming it to InputPartExtended or something like TestTEst, it works. where can I read up on the naming convention?
Geoff Barlow
@agency8_gitlab
Hi all, I'm new to Orchard and liking what I see already. My main strength is themes. I have a question about the theming process and hopefully you can give an answer.. In Orchard you have cshtml files and liquid files that can be used, can someone tell me if its better to use a mixture of cshtml and liquid or just liquid. The reason behind my question is that I have to point of view that only designers/developers should be able to edit the templates and not the editors. In most cases the layout will not be changed so therefore the main layout, footer, header etc (apart from the places for extra content). should be using cshtml but is that the way Orchard themes is supposed to be used or should there always be access to the templates in the cms by using liquid templates?
Dean Marcussen
@deanmarcussen
@agency8_gitlab it is essentially up to you. OC supports both liquid and html templates in Views folder locations, so you can use whichever works better for you there (and sometimes that's a mixture). In terms of the liquid template editing in the cms, again it is up to you. Maybe you want your content editors to be able to update templates, maybe you don't. It is designed as a feature, so you can make your own choices on what your needs and preferences are.
JimmyLiu7323
@JimmyLiu7323
@deanmarcussen just wondering, does orchard support upload image from code? thanks~
18 replies
weirdyang
@weirdyang
For migrations, what is the difference between returning 1 or 2 for the create method?
weirdyang
@weirdyang

Yes, I was thinking about that. How do I do that? I am using the template from TheAgency, not a Form Widget

I notice that the widget doesn't check if you entered a name. if you don't enter a name, the input part will fail to render and throw an exception when it checks the modelstate

ruisdias
@ruisdias
Hi @deanmarcussen, regarding the bag part which is creating different id's from the items, remember? I tested it and It doesn't change the Id just on the first level.
Type -> BagPart<Type2>
Type2 -> BagPart<Type3>
In this case the items from the bag part of type3 are always creating new id's.
Maybe your solution just fixed the first level and not in a recursive way. Do you think this could happen?
Jus
@Jus56288672_twitter
Can anyone help me designing a workflow? I have a basic role User, that can only view all, and edit their own content. When the User type publishes a BlogPost, I need an approval process before the BlogPost is actually published. Say an Editor role can view, and approve or decline the BlogPost
Jus
@Jus56288672_twitter
another question: How can i get access to user role from a JavaScript expression in a workflow? input("something")
Robert
@remesq
image.png
Anyone have an idea how I might have screwed up to make the title bar display thusly ^
I've been reviewing my code and trying to figure out where I made a mistake to do that
<title>@RenderTitleSegments(Site.SiteName, "after")</title>
That's in my layout (well, a resource page I use which I call to)
{{ Model.Content.ContentsMetadata | shape_render }}
And I have that in a Content Page