Copied to clipboard

Flag this post as spam?

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


  • ShannonC 9 posts 81 karma points
    Jun 26, 2024 @ 17:43
    ShannonC
    0

    Umbraco 13 documentation with code samples?

    My developer and i are getting pretty frustrated with a basic Hello World start to a new site using Umbraco 13. I can not find basic code samples for essentially reading out a textstring in a template that includes libraries used etc.. (nothing we're doing is working from previous versions). I've seen some images of code which is extremely frustrating to type out, but no copy pasta like in the past to get going with.

    Also not seeing any code samples or anything for any of the datatypes. Am I missing something? It says it is an LTS and Umbraco is on version 14 so I'd think there would be some documentation on templating...

    We've already reverted from 14 due to lack of documentation and not being able to define labels to blocklists. Is it suggested that we revert again to a version that has docs for templating? Really don't want to finger through it on github,

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jun 26, 2024 @ 18:09
    Huw Reddick
    0

    What exactly do you need help with? There is plenty of documentation available

  • ShannonC 9 posts 81 karma points
    Jun 27, 2024 @ 17:08
    ShannonC
    0

    Lets start with a blocklist snippet or a "hello world" with a datatype of textstring. Haven't had success with blocklists. We've tried so many things, this is the current thing we're trying. We are not getting errors, but nothing is printing out (we've tried republishing and rebuilding project):

    @inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage;
    @using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
    @using Umbraco.Cms.Core.Models.Blocks;
    @{
        var variants = Model.Value<IEnumerable<BlockListItem>>("pageSectionOrSubsection").Select(x => x.Content);
        foreach (var variant in variants)
        {
    <h2>@variant.Value("title")</h2>
            @variant.Value("pageSectionContent")
        }
    }
    
  • ShannonC 9 posts 81 karma points
    Jun 27, 2024 @ 17:10
    ShannonC
    0

    Also where is the templating/code snippets for different datatypes for umbraco 13 located?

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jun 27, 2024 @ 17:43
    Huw Reddick
    0

    check out this repository for ideas on how to work with the block grid

    https://github.com/UmTemplates/UmBootstrap

    Also where is the templating/code snippets for different datatypes for umbraco 13 located

    You'll need to be a little more specific, what exactly do you want to do?

Please Sign in or register to post replies

Write your reply to:

Draft