Copied to clipboard

Flag this post as spam?

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


  • a 8 posts 88 karma points
    Feb 04, 2020 @ 15:42
    a
    0

    Displaying Images multiples

    I am new to the world of Umbraco. Struggling with some bits. But my question is how do I render these three images that have been added in this manor from a partial page. Thank you. And as you have gathered that is not the team, GDPR in mind.

    enter image description here

  • Marc Goodson 2157 posts 14431 karma points MVP 9x c-trib
    Feb 06, 2020 @ 06:59
    Marc Goodson
    100

    Hi a

    It 'looks like' you have a page here that is using the Umbraco Grid, and that you have a custom row called 'three columns' and images inserted into each column using the media grid editor...

    If you 'only' had this page then you would render anything placed in the grid, with one statement:

    @Html.GetGridHtml(Model, "propertyAlias")
    

    where "propertyAlias" is the alias of the grid layout property on the document type...

    https://our.umbraco.com/Documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Grid-Layout/Render-Grid-In-Template

    This one statement will write out all markup around the grid - using a grid renderer file that lives in /views/partials/grid/ the default one is bootstrap-3.cshtml - but you can create your own implementation of the grid layout html, by coping one of these renderer, files, and doing your thing, and then writing out the grid in the template like so:

    @Html.GetGridHtml(Model, "propertyAlias","newRendererName")
    

    Your custom implementation layout will be used instead for the grid content.

    Each 'editor' that you drop into the grid has it's own implementation and html, these live in

    /views/partials/grid/editors

    with the name of the implementation file matching the alias of the editor

    so media.cshtml will have the markup for generically rendering an image inside a grid cell.

    So is that what you need? or you mention partial page? so is this Meet the Team 'not the page' and is somehow included within another page?

    regards

    Marc

  • a 8 posts 88 karma points
    Feb 06, 2020 @ 09:10
    a
    0

    Thanks Marc, for taking the time to reply.

    That was a great answer.

    Adam

Please Sign in or register to post replies

Write your reply to:

Draft