Copied to clipboard

Flag this post as spam?

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

  • Carsten Johannesen 35 posts 55 karma points
    Mar 02, 2011 @ 11:44
    Carsten Johannesen

    Version 4.7RC macros / user controls and parameters transfer

    Just updated to version 4.7RC to have the caching issues resolved.

    But it seems that the parameter transferral funtionality from Umbraco has changed:

    I used to test if a string parameter was = "" (empty string) to apply a default value, but that test now does not work. The test was loacted in the set part of the property declaration.

    However Umbraco no longer transfers empty macro paramters - so my debugging has led me to conclude that when the parameter is not stated in the macro "call" in umbraco the set call is not executed.

    So the test needs to be moved from the property.set to the "normal" code.



  • John 27 posts 49 karma points
    Apr 15, 2011 @ 15:42

    Did you ever find a solution to this problem, I have just done an upgrade and now all my macros with parameters have stopped working.




  • Carsten Johannesen 35 posts 55 karma points
    Apr 18, 2011 @ 09:23
    Carsten Johannesen

    Yes, I moved the test from the property section into the "regular" code - for example:

     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
    If String.IsNullOrEmpty(Filter) Then ' Default værdi "Nyheder"
        Filter = "Nyheder"

    End If

    Filter is a string property transferred from Umbraco (if it is filled out in umbraco) otherwise I initialize it in my regular code to prevent any problems.

Please Sign in or register to post replies

Write your reply to: