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

wrapper content seems to be wrong #306

Open
rtpHarry opened this issue Sep 21, 2016 · 1 comment
Open

wrapper content seems to be wrong #306

rtpHarry opened this issue Sep 21, 2016 · 1 comment

Comments

@rtpHarry
Copy link
Contributor

http://docs.orchardproject.net/en/latest/Documentation/Understanding-placement-info/#wrapper

Says:

Create this file and put the following text in it:

<div class="htmlWrapperContent">
    @Model.Html
</div>

But it seems like it's

@Display(Model.Metadata.ChildContent)

Not sure if that's in every case or not. I was working with a Part (Orchard.Cw.Disqus) but I found discussion on the web saying that it also worked for Fields.

@rtpHarry
Copy link
Contributor Author

Some of the wrappers use this shape from CoreShapes.cs:

    [Shape]
    public IHtmlString PlaceChildContent(dynamic Source) {
        return Source.Metadata.ChildContent;
    }

Which is used like @Display.PlaceChildContent(Source: Model)

This seems like an attempt to standardise it.

Some (widgets and elements) provide a shortcut on their shape under .Child which is implemented in the modules IShapeTableProvider like this.

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

No branches or pull requests

1 participant