Giter Site home page Giter Site logo

umbraco-segments's Introduction

Umbraco Segments

A small demo of getting started with segments in Umbraco 10. This was based on the 24 Days article showing Umbraco segments in v8.

How to get started

Open Segments.sln and run the Website project or simply type the below from the command line in the project root:

dotnet run --project Website

What's going on?

Segments are a feature within Umbraco that have existed for a while, but are hidden. The 24 Days article does a great job of explaining each step.

Firstly we need to enable segments (done in SegmentHelper.Events.AllowSegmentationEvent)

Then we get the option within the back office to enable Segments, same place in Document Types as with the Vary by Culture flag

After creating a page you then have the same UI as with multi-languages to change segment data (drop-down in name bar)

A test page has been setup. Visit https://localhost:44369/blog/segment to see the regular page and then https://localhost:44369/blog/segment?segment to see the segmented page. Here's a quick demo of it in action:

chrome_cdZfGgX1fI

Issues

  • There's a few issues with segments, mainly centered around the UI within Umbraco itself. I've found issues when pages have been created that you need to refresh them in order to see the segment options.
  • New segments can't be added to existing nodes, likely fixed by altering SegmentHelper.Events.CreateSegmentsEvent.
  • Multi-lingual hasn't been tested.
  • Each property on a doc type gets an overlay warning the user it will change for all segments - this doesn't happen for language variants and is poor UX.

umbraco-segments's People

Contributors

rockerby avatar

Watchers

 avatar

Forkers

lssweatherhead

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.