Copied to clipboard

Flag this post as spam?

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


  • Claushingebjerg 919 posts 2519 karma points
    May 14, 2020 @ 08:30
    Claushingebjerg
    1

    Help setting up Perplex.ContentBlocks

    Theres a new content blocks package out by Perplex. Perplex.ContentBlocks - https://our.umbraco.com/packages/backoffice-extensions/perplexcontentblocks/

    The demo video looks absolutely awesome, and it's something like this we have been missing in 8.

    So i was super excited...

    Unfortunately its very Developer oriented, and assumes use of a VS project.

    As a frontender, i (and many others) dont use VS when doing umbraco sites.

    So i'm looking for a step by step guide to get Perplex.ContentBlocks up and running without compiling a project in VS.

    So if anyone has it up and running this way, please post a step-by-step guide, preferebly with complete code examples, as it looks to be an editors dream.

    Thanks!

  • Daniël Knippers 137 posts 992 karma points MVP 2x c-trib
    May 15, 2020 @ 06:36
    Daniël Knippers
    101

    Hi Claus,

    Our editor is indeed configured completely in code. This means you need to be able to write C# and compile it one way or the other. Visual Studio isn't strictly necessary to compile C# code though, but yeah I get your point :-)

    The step-by-step guide you asked for is already available on our GitHub page, please have a look there. But yes, that assumes you have a way to compile code, Visual Studio being the easiest way.

    Regards,

    Daniël Knippers

  • Claushingebjerg 919 posts 2519 karma points
    May 15, 2020 @ 06:41
    Claushingebjerg
    0

    Ok, thanks for your replay.

    I guess it's back to standard nested content and the waiting game for the core block builder :|.

    Too bad, it really looks great.

  • Daniël Knippers 137 posts 992 karma points MVP 2x c-trib
    May 15, 2020 @ 06:47
    Daniël Knippers
    0

    It's really not necessary, Visual Studio has a free version and installing Umbraco + our package is a few clicks with NuGet.

    The documentation contains a full code example file you can just copy/paste into the solution. If you are familiar with NPM for your front-end projects this should feel familiar so I don't see many obstacles here.

    I would recommend trying that, might come in handy for other stuff as well to be able to build an Umbraco solution. Anyway of course it's completely up to you!

  • Claushingebjerg 919 posts 2519 karma points
    May 15, 2020 @ 06:54
    Claushingebjerg
    0

    :) yeah thanks i know.

    I'm on a mac and have been making 100s of umbraco sites for more than 12 year without ever using VS or having backend .net knowledge.

    I'm not going down that route to install a package :).

  • Daniël Knippers 137 posts 992 karma points MVP 2x c-trib
    May 15, 2020 @ 13:21
    Daniël Knippers
    1

    Hi Claus,

    I was informed by a wise colleague that you can actually throw any .cs file in a folder named App_Code in the root of your solution and it should be compiled on the fly. This was from the era of uncompiled projects that I know hardly anything about :)

    So if you take the example code I posted on GitHub under "Quick Start" and save it to e.g. App_Code\Example.cs you should be able to get going even without Visual Studio.

  • Claushingebjerg 919 posts 2519 karma points
    May 15, 2020 @ 14:02
    Claushingebjerg
    0

    Yeah, i saw that on twitter :). Tried it. It did nothing :).

    What i was looking for was a bare bones "examples.cs" that doesn't contain all the creation of new doc types, but simply what is needed to describe a simple nested content block.

    That was how far i got. I never got to rendering. Does rendering require compiling as well?

  • Daniël Knippers 137 posts 992 karma points MVP 2x c-trib
    May 15, 2020 @ 14:06
    Daniël Knippers
    0

    I also tried it, it did actually compile it on the fly for me. Anyway, that Example.cs of GitHub does describe the Content Blocks. But part of that is creating a Nested Content datatype, which in turn needs a document type. It also does that, but you can just ignore that part right :)?

    Regardless, if you just want to see the block definition + layouts in code, have a look at this line: https://github.com/PerplexDigital/Perplex.ContentBlocks/blob/master/src/DemoWebsite/Example.cs#L41

  • Claushingebjerg 919 posts 2519 karma points
    May 15, 2020 @ 14:22
    Claushingebjerg
    0

    Firstly, thank you for taking your time :)

    I'm an idiot :) i put the file in App_Data, but i spotted you changed the docs to include:

    "If you do not have Visual Studio or another tool to compile code, you can save the code to a .cs file in App_Code in the root of your project, which should compile it on the fly. If the folder does not exist yet simply create it."

    So now i have it up and running :). I'll do some more messing around to get my head around it. Thanks for now. And have a great weekend. H5YR.

  • Daniël Knippers 137 posts 992 karma points MVP 2x c-trib
    May 15, 2020 @ 14:29
    Daniël Knippers
    0

    Haha don't feel bad, I also put it in App_Data first and was confused :D Happy it's figured out.

    As for your other question; rendering does not require compilation but you do need to put a partial view somewhere (and reference it in your layout).

    Some inspiration about the view format can also be found on GitHub.

    Have a great weekend as well!

Please Sign in or register to post replies

Write your reply to:

Draft