Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ShapeMetadata access in liquid #8024

Merged
merged 1 commit into from
Dec 17, 2020
Merged

Conversation

TFleury
Copy link
Contributor

@TFleury TFleury commented Dec 16, 2020

and allow to render IHtmlContent with shape_render filter

Fixes #8021

and allow to render IHtmlContent with shape_render filter
@agriffard agriffard changed the title Fixes #8021 : Allow ShapeMetadata access in liquid Allow ShapeMetadata access in liquid Dec 16, 2020
@agriffard agriffard requested a review from jtkech December 17, 2020 08:57
@@ -124,7 +124,8 @@ static async ValueTask<FluidValue> Awaited(Task<IHtmlContent> task)
return new HtmlContentValue(await task);
}

if (input.ToObjectValue() is IShape shape)
var shape = input.ToObjectValue();
if (shape != null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to check if it is an IShape or an IHtmlContent

But i saw that it is checked in IHtmlContent CoerceHtmlString(object value)

And if it is another object type, we return StringHtmlContent(value.ToString())

So that's okay ;)

@jtkech jtkech merged commit aa102c4 into OrchardCMS:dev Dec 17, 2020
TFleury added a commit to Codinlab/OrchardCore that referenced this pull request Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to build liquid Form_Wrapper
2 participants