Copied to clipboard

Flag this post as spam?

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


  • blackhawk 289 posts 1250 karma points
    1 week ago
    blackhawk
    0

    Achieving something similar to WordPress snippets

    In WordPress, developers can create short code snippets for editors and contributors to use in various parts of their wysiwyg areas.

    Within Umbraco's RTE areas, what would be the equivalent?

    Thanks for any tips!

  • Nigel Wilson 731 posts 1548 karma points
    1 week ago
    Nigel Wilson
    0

    Hi blackhawk

    A couple of initial ideas.

    1. Grid Editor - you can create custom "snippets" which can be dropped into a column on the Grid. There is a good package which helps in this regard - https://our.umbraco.org/projects/backoffice-extensions/doc-type-grid-editor/

    This option is ideal if you don't have snippets that need re-used within pages.

    1. Create a "Snippets" folder at the root of a site and then create document types for each snippet. Then on a page you can have a content picker (or multiple content picker) to pick the snippets.

    Hope these ideas help.

    Cheers, Nigel

  • blackhawk 289 posts 1250 karma points
    56 minutes ago
    blackhawk
    100

    aahhh - My eyes are now open for what we can do with macros through Umbraco. I now see that...

    • We can associate them to RTE's, which editors can pick through a drop-down.
    • I can leverage custom razor coding through partial views for macros
    • I can select through many marco parameters
    • They are reusable :)

    To me, this is a lot like WordPress snippets.

    Nigel, thanks for sparking the fire!

  • Nigel Wilson 731 posts 1548 karma points
    23 minutes ago
    Nigel Wilson
    0

    all good - I love hearing your "excitement" - I've felt it lot's of times with this awesome product...

    Enjoy !

Please Sign in or register to post replies

Write your reply to:

Draft