Copied to clipboard

Flag this post as spam?

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


  • Anthony Candaele 1197 posts 2049 karma points
    Jan 02, 2011 @ 12:17
    Anthony Candaele
    0

    unable to debug

    Hi,

    I try to debug a usercontrol (SidebarWidget.ascx).

    On my homepage template I have added a macro like this:

    <umbraco:Macro Alias="sidebarWidgets" Widgets="[$sidebarWidgets]" runat="server"></umbraco:Macro>

    For some reasons, the widgets are not showing on my homepage, so now I try to debug the SidebarWidget usercontrol.

    For this I follow the instructions of Niels Hartvig in the video tutorial on debugging (Umbraco TV).

    I set a breakpoint in my SidebarWidget.ascx.cs file and in Visual Studio 2010 I attached the process w3wp.exe

    But if I refresh my homepage, notting happings, Visual Studio does not step into the breakpoint that I set in SidebarWidget.ascx.cs

    Am I overlooking something. The operating system on my development machine is Windows 7 and I use IIS 7


    Thanks for your help,

    Anthony Candaele
    Belgium

  • Comment author was deleted

    Jan 02, 2011 @ 12:52

    @Anthony, and is the macro alias correct ? + if you check the macro is it linked to the correct usercontrol?

  • Anthony Candaele 1197 posts 2049 karma points
    Jan 02, 2011 @ 13:37
    Anthony Candaele
    0

    Hi Tim,

    First of all Happy New Year and lots of success on the Umbraco Team.

    I try to implement the widget solution as instructed by Hendy Racher:

    http://blog.hendyracher.co.uk/sidebar-widgets-with-umbraco-v4/

    One thing, I think I have overlooked, is that I didn't add a macro (SidebarWidget) in the RichText property of my Widget document type:

    But the sidebarWidget usercontrol is not listed in the list of macro's I can add.

    Thanks for your help,

    Anthony

  • Anthony Candaele 1197 posts 2049 karma points
    Jan 02, 2011 @ 13:40
    Anthony Candaele
    0

    Hi Tim,

    First of all Happy New Year and lots of success on the Umbraco Team.

    I try to implement the widget solution as instructed by Hendy Racher:

    http://blog.hendyracher.co.uk/sidebar-widgets-with-umbraco-v4/

    One thing, I think I have overlooked, is that I didn't add a macro (SidebarWidget) in the RichText property of my Widget document type:

    But the sidebarWidget usercontrol is not listed in the list of macro's I can add.

    Thanks for your help,

    Anthony

  • Kim Andersen 1447 posts 2197 karma points MVP
    Jan 02, 2011 @ 13:40
    Kim Andersen
    0

    Hi Antohny, You have to mark the macro as usable in the richtext editor. You can do this in the developer section, find the macro under the "Macros"-folder, and then check the "Use in editor" checkbox.

    /Kim A

  • Anthony Candaele 1197 posts 2049 karma points
    Jan 02, 2011 @ 13:49
    Anthony Candaele
    0

    Hi Kim,

    Yes, I found that out a couple of minutes myself. Now I able to add the macro sidebarWidget to my RichtText property of my widget document type, but still now widget on the rendered page :(

    The problem is that I can't see what's going in my SidebarWidgets.ascx user control because I'm not able to debug that user control.

    Thanks for your help,

    Anthony Candaele
    Belgium

  • Anthony Candaele 1197 posts 2049 karma points
    Jan 02, 2011 @ 13:52
    Anthony Candaele
    0

    Hi Kim,

    Yes, I found that out a couple of minutes myself. Now I able to add the macro sidebarWidget to my RichtText property of my widget document type, but still now widget on the rendered page :(

    The problem is that I can't see what's going in my SidebarWidgets.ascx user control because I'm not able to debug that user control.

    Thanks for your help,

    Anthony Candaele
    Belgium

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Jan 02, 2011 @ 13:57
    Sebastiaan Janssen
    0

    Can you debug it when you just put it as a macro in the template? Might be something else going on in there. Also, I do believe that there was an issue with certain kinds of macros not working when inserted in the RTE, but I can't remember what the problem was. 

    Have you tried to wrap a <form runat="server"> around the whole page, to make sure the macro gets triggered?

  • Anthony Candaele 1197 posts 2049 karma points
    Jan 02, 2011 @ 14:18
    Anthony Candaele
    0

    @Sebastiaan

    I don't understand what you mean with wrapping the page in a <form runat="server"> control, I already use such a control in the masterpage.

    I checked the html of my RichText property of my document type, this is what I get:

    <div umb_macroalias="sidebarWidgets" umb_link="www.actionmaker.be" umb_image="1089" umb_intro="Webmove welcomes a new client" umb_title="In The Picture" ismacro="true" onresizestart="return false;" umbversionid="8d41715e-cb17-40be-bb51-d00ce465c087" umbpageid="1098" title="This is rendered content from macro" class="umbMacroHolder"><!-- startUmbMacro --><span>No macro content available for WYSIWYG editing</span><!-- endUmbMacro --></div>

    In thte wysiwig mode of the richtextbox editor the sidebar widget macro looks like this:

     

  • Anthony Candaele 1197 posts 2049 karma points
    Jan 02, 2011 @ 14:20
    Anthony Candaele
    0

    @Sebastiaan

    I don't understand what you mean with wrapping the page in a <form runat="server"> control, I already use such a control in the masterpage.

    I checked the html of my RichText property of my document type, this is what I get:

    <div umb_macroalias="sidebarWidgets" umb_link="www.actionmaker.be" umb_image="1089" umb_intro="Webmove welcomes a new client" umb_title="In The Picture" ismacro="true" onresizestart="return false;" umbversionid="8d41715e-cb17-40be-bb51-d00ce465c087" umbpageid="1098" title="This is rendered content from macro" class="umbMacroHolder"><!-- startUmbMacro --><span>No macro content available for WYSIWYG editing</span><!-- endUmbMacro --></div>

    In thte wysiwig mode of the richtextbox editor the sidebar widget macro looks like this:

     

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Jan 02, 2011 @ 14:40
    Sebastiaan Janssen
    0

    Never mind, just checked and that won't help! :-)

    I bet in the frontend that the output is something like <?UMBRACO_MACRO ... /> right?

    I believe that if you try to render the rich text area through an XSLT macro, then it's a nested macro and that will not work. Instead, you need to output the the content of the RTE in your template like:

    <umbraco:Item field="sidebarWidgets" runat="server"></umbraco:Item>
  • Anthony Candaele 1197 posts 2049 karma points
    Jan 02, 2011 @ 16:28
    Anthony Candaele
    1

    Phew,

    I finaly got the widget solution as suggested on Hendy Racher's blog implemented:

    http://blog.hendyracher.co.uk/sidebar-widgets-with-umbraco-v4/

    The problem I had, was because I didn't push the button 'browse properties' to add the property 'widget' to my macro. This made me second guess, thinking I had to add parameters to the macro for every field.

    After solving this, I found out that Hendy's widget solution is very flexible, one can add all the content for the widget in a RichtText editor field:

    I find this solution more flexible than implemting widgets through a macro container, because widgets can be managed in the content tree. A content administrator just needs to check wich widgets he want to implement on his page:

    Thanks to all community members who assisted me with this: Tim, Kim and Sebastiaan

    Anthony


     

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Jan 02, 2011 @ 19:05
    Sebastiaan Janssen
    0

    Great, that's much better Anthony, I should've recommended that in the first place, should blog about this some more as well as I'm doing it a little differently.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies