Copied to clipboard

Flag this post as spam?

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


  • Michael Jensen 35 posts 85 karma points
    Sep 29, 2013 @ 19:10
    Michael Jensen
    0

    Make a static images show if no images if uploade

     

    Hey,

    iam trining to make a no images "images " to show if thear is no images uploadet to the node.

    iam usning a uploade generic propety to loade images to the node.

     

    this is the template set up iam usning.

    i hope some can help me?

     

    iam usning letes umbraco version on a det net server 4.5 full thrust.

    it is on this page i use the postede code.

    http://www.hirtshalsvask.the-appcenter.dk/indleveringssteder/hjoerring-centrum.aspx

     

    best ragards

    michael

     

    <asp:Content ContentPlaceHolderID="Content" runat="server">
        <div class="container">
            <div class="row">
                <div class="3u">
                    <!-- Sidebar -->
                    <h3>Indleveringssteder:</h3>
                    <umbraco:Macro NodeId="1070" Alias="ListSubPagesByAncester" runat="server"></umbraco:Macro>
                </div>
                <div class="9u skel-cell-mainContent">
    
                    <!-- Content -->
    
                    <article class="first">
    
                        <div class="placeOfDeliveryWrapper">
                <div class="placeOfDeliveryLeft">
                    <div class="placeOfDeliveryH2">
                        <h2><umbraco:Item field="placeOfDeliveryName" runat="server" /></h2>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Adresse:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryAdress" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Postnummer:</div>
                        <div class="placeOfDeliveryUmbracoFeld">DK-<umbraco:Item field="placeOfDeliveryZipCode" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">By:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryCity" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Telefon:</div>
                        <div class="placeOfDeliveryUmbracoFeld">+45&nbsp;<umbraco:Item field="placeOfDeliveryPhone" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel"></div>
                        <div class="placeOfDeliveryUmbracoFeld"></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Åbningstider</div>
                        <div class="placeOfDeliveryUmbracoFeld"></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Mandag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryMonday" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Tirsdag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryTuesday" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Onsdag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryTuesday" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Torsdag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryThursday" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Fredag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryFriday" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Lørdag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliverySaturday" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Søndag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliverySunday" runat="server" /></div>
                    </div>
    
                </div>
                <div class="placeOfDeliveryRight">
                    <div class="placeOfDeliveryImage">
    

    <img src="<umbraco:Item field="image" runat="server" />" alt="Billede af den bygning hvor Indleveringsstedet ligger" />

    </div> <div class="placeOfDeliveryDrevningGuide"> <umbraco:Item field="placeOfDeliveryDrevningGuide" runat="server" /> </div> </div> </div> </article> </div> </div> </div> </asp:Content>

     

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Sep 29, 2013 @ 21:28
    Dennis Aaen
    100

    Hi Michael,

    I think you could do it this way:

    <asp:Content ContentPlaceHolderID="Content" runat="server">
        <div class="container">
            <div class="row">
                <div class="3u">
                    <!-- Sidebar -->
                    <h3>Indleveringssteder:</h3>
                    <umbraco:Macro NodeId="1070" Alias="ListSubPagesByAncester" runat="server"></umbraco:Macro>
                </div>
                <div class="9u skel-cell-mainContent">

                    <!-- Content -->

                    <article class="first">

                        <div class="placeOfDeliveryWrapper">
                <div class="placeOfDeliveryLeft">
                    <div class="placeOfDeliveryH2">
                        <h2><umbraco:Item field="placeOfDeliveryName" runat="server" /></h2>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Adresse:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryAdress" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Postnummer:</div>
                        <div class="placeOfDeliveryUmbracoFeld">DK-<umbraco:Item field="placeOfDeliveryZipCode" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">By:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryCity" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Telefon:</div>
                        <div class="placeOfDeliveryUmbracoFeld">+45 <umbraco:Item field="placeOfDeliveryPhone" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel"></div>
                        <div class="placeOfDeliveryUmbracoFeld"></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Åbningstider</div>
                        <div class="placeOfDeliveryUmbracoFeld"></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Mandag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryMonday" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Tirsdag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryTuesday" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Onsdag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryTuesday" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Torsdag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryThursday" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Fredag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliveryFriday" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Lørdag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliverySaturday" runat="server" /></div>
                    </div>
                    <div class="placeOfDeliveryTextMiniWrapper">
                        <div class="placeOfDeliveryLabel">Søndag:</div>
                        <div class="placeOfDeliveryUmbracoFeld"><umbraco:Item field="placeOfDeliverySunday" runat="server" /></div>
                    </div>

                </div>
                <div class="placeOfDeliveryRight">
                    <div class="placeOfDeliveryImage">

               <umbraco:Image field="image" textIfEmpty="path to image when the field is empty" runat="server" />

                    </div>
                    <div class="placeOfDeliveryDrevningGuide">
                        <umbraco:Item field="placeOfDeliveryDrevningGuide" runat="server" />
                    </div>
                </div>
            </div>


                    </article>

                </div>
            </div>
        </div>

    </asp:Content>

    Documentation: http://our.umbraco.org/wiki/reference/templates/umbracoitem-element/additional-attributes/textifempty and http://24days.in/umbraco/2012/introducing-the-umbraco-image-control/ and http://pastebin.com/w6FgVgPA

    /Dennis

  • Michael Jensen 35 posts 85 karma points
    Sep 30, 2013 @ 08:38
    Michael Jensen
    0

    Hey Dennis.

    Supper nice and thanks that dit it 100 %

     

    Michael

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Sep 30, 2013 @ 10:13
    Dennis Aaen
    0

    Hi Michael,

    Good to hear that :-)

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft