Copied to clipboard

Flag this post as spam?

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


  • Christoffer Andersen 23 posts 53 karma points
    Feb 25, 2010 @ 11:01
    Christoffer Andersen
    0

    umbraco speechBubble in custom section

    Greetings

     

    In a custom section I would like to make use of the umbraco speechBubble, where in this situation I need it to simply state Text saved.

    I know if I wanted to make use of it in a macro I would simply make a reference to the basepage and then make use of the speechBubble as shown below:

     

    ((BasePage)Page).speechBubble(BasePage.speechBubbleIcon.info, "Text saved","");

     

    However as I am in a custom section, my page is not a basepage.

    Anyone got an idea on how to access the above code in a custom section?

     

    With kind regards

    Christoffer Andersen

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 25, 2010 @ 11:14
    Lee Kelleher
    102

    Hi Christoffer,

    Is your page inheriting from the "umbraco.BasePages.UmbracoEnsuredPage" class? If not, then you should.  It will add extra protection in the back-office, i.e. so no one can access the page anonymously.

    Once you inherit from it, you can access the speechBubble like so:

    base.speechBubble(BasePage.speechBubbleIcon.save, ui.Text("speechBubbles", "fileSavedHeader"), ui.Text("speechBubbles", "fileSavedText"));

    (This is a snippet from my Robots.txt Editor code - make use of the language/dictionary keys)

    Cheers, Lee.

  • Christoffer Andersen 23 posts 53 karma points
    Feb 25, 2010 @ 12:33
    Christoffer Andersen
    0

    Hey referencing to UmbracoEnsuredPage did the trick, thank you for the help Lee

    Kindly

    Christoffer

Please Sign in or register to post replies

Write your reply to:

Draft