Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Billy 22 posts 102 karma points
    15 days ago

    Column width in component partial view


    I'm trying to create a component in the grid to print an image. The width of the image should depend on the column in which it is used.

    For example:

    • An image in a 12 column width should be 1200px .
    • An image in a 6 column width should be 600px.

    Is there a way to get this column width already? Can it be passed to my partial view?

    @{ var imageWidth = ?; } <div class="image-component"> <img src="@Model.Image.GetCropUrl(imageWidth);" alt="" /> </div>

    Thanks for any help.

Please Sign in or register to post replies

Write your reply to: