Copied to clipboard

Flag this post as spam?

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


  • James 251 posts 1169 karma points
    Nov 17, 2014 @ 14:21
    James
    0

    Using DAMP in Umbraco Issue

    Hi Guys,

     

    I have damp installed. Its workign elsewhere on the site.

     

    I have a property on my doc type called "eventSponsors" which is a DAMP multi-media picker.

     

    I have a foreach loop like this on my template:

    @foreach(dynamic d in Model.eventSponsors){

     <p>@d.Url</p>

     

    }

     

    I cannot get anything to print to screen it comes up blank or i get :

    Error loading MacroEngine script (file:

    Any Ideas?

     

    Kind regards,

     

    J

     


     

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Nov 17, 2014 @ 14:33
    Dennis Aaen
    0

    Hi James,

    What you could try to do to get an idea on what is going wrong is to go your webconfig file, and set the umbracoDebugMode to true.

    <add key="umbracoDebugMode" value="false"/>

    And after this try to add ?umbDebugShowTrace=true to the URL that you are watching.

    By doing this you will get the stack trace with some more information on what is going on.

    Hope this helps,

    /Dennis

  • James 251 posts 1169 karma points
    Nov 17, 2014 @ 16:30
    James
    0

    Hi Dennis, 

     

    I have a feeling this feature isn't working on this installation. I have done what you listed and I am presented with no Stack on loading the page (with the ?umbDebugShowTrace=true adaption to the URL).

     

    Very strange. 

     

    My foreach: (I Currently have two images inside the DAMP media picker)

    @foreach (dynamic d in Model.EventSponsors)

                    {

                        <p>Test</p>

                    }

    This populates my page with about 10 <p>Test</p>

     

    If i put:

     

    {

    @d.Id

    }

     

    My page gets :

     

    Error loading MacroEngine script (file:

     

    Any ideas?

     

    Kind regards,

     

    J

  • James 251 posts 1169 karma points
    Nov 17, 2014 @ 16:57
    James
    0

    If i do

     

    {

    <p>@d</p>

    }

     

    I get the following rendered:

    <p>1</p>
      <p>9</p>
      <p>9</p>
      <p>0</p>
      <p>7</p>
      <p>,</p>
      <p>4</p>
      <p>1</p>
      <p>2</p>
      <p>3</p>
      <p>5</p>
      <p>,</p>
      <p>1</p>
      <p>9</p>
      <p>9</p>
      <p>0</p>
      <p>7</p>
  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Nov 17, 2014 @ 18:15
    Dennis Aaen
    100

    Hi James,

    What if you are doing something like this

    <ul>
        @foreach (dynamic d in Model.eventSponsors){
           
    <li>
               
    <imgsrc="@DAMP_Helper.GetImageCropperUrl(d, "wideCrop")"alt="@d.ImageWide.nodeName"/>
           
    </li>
        }
    </ul>

    And make sure that you document type alias is correct, by default Umbraco uses lower case for the first letter in the alias of on the fields document types.

    In the space for the DAMP Media Picker you can also find a package with some samples on how to use it. http://our.umbraco.org/projects/backoffice-extensions/digibiz-advanced-media-picker called DAMP 2.5 Samples http://bit.ly/1295mvn My examle is taking from the samples package where it uses the image cropper.

    If you install the samples package you will get a sample site aside with your normal site and you can investigate how it works.

    Hope this helps,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft