This project is read-only.

How to wrap few shapes to one div?

Topics: General, Writing themes
Jul 24, 2012 at 3:22 PM
Edited Jul 24, 2012 at 3:42 PM

I want to wrap few content parts into one div.
Now I'm solving this by following way:
I have created Content-TripRoute.cshtml to overload content rendering of my type TripRoute.

    @{ var shapes = (IEnumerable<dynamic>)Model.Content.Items; }
            @Display(shapes.First(x => x.Metadata.Type == "Parts_TripRoutePart"));
            @Display(shapes.First(x => x.Metadata.Type == "Parts_TripRoutePart_Map"));
            @Display(shapes.First(x => x.Metadata.Type == "Parts_FullDescriptionPart"));

Is it a right way to wrap few shapes to one div?

Jul 24, 2012 at 3:38 PM

Can't answer your question, but your code snippet could come in handy - thanks ;)

Jul 24, 2012 at 5:41 PM
Edited Jul 24, 2012 at 5:42 PM

Yes. It's more or less what I was showing in this post:

Of course once you've done that you can't use placement.

Jul 26, 2012 at 11:03 AM

Thanks, Bertrand, it is what I'm looking for.