Latest: https://youtu.be/LyVZySzKoI8 (Unit Testing Blazor ASP.NET 5) This lecture will cover the following topics: Creating a custom Razor Page

In the editor, in the Pages folder, create a new file named BlogPost.cshtml with the following content:

Loading a Blog Post from its identifier
Each content item in Orchard Core has a unique and immutable Content Item Identifier. We can use it in our Razor Page to load a blog post.
Accessing the other properties of a Content Item

In the previous section, the DisplayText property is used to render the title of the blog post. This property is common to every content item, so is the ContentItemId or Author for instance. However, each Content-Type defines a unique set of dynamic properties, like the Markdown Part that we added in the Content Modeling section. (Part 2)

The dynamic properties of a content item are available in the Content property, as a JSON document.

Loading a Blog Post from a custom slug
Even though we can load blog posts from their Content Item Id, this is not user friendly and good SEO optimization is to reuse the title in the URL.
Generating the slug using a custom pattern

The Alias Part provides some custom settings in order to let it be generated automatically. In our case we want it to be generated from the Title, automatically. To provide such patterns the CMS uses a templating language named Liquid, together with some custom functions to manipulate content items’ properties. Orchard provides a generally suitable default pattern

Watch Part 1: https://youtu.be/kKRGqaaG1WE
Watch Part 2: https://youtu.be/uzFUcK-wIrg

Like || Share || Spread || Love

Make sure you subscribe to our YouTube Channel and never miss our latest video:- http://bit.ly/Kaushik-roy-chowdhury-subscribe

Support The Channel By Donations:
https://www.patreon.com/deveducator

For more updates Follow us on:-

Visit- https://kaushikroychowdhury.com

Facebook- https://www.facebook.com/deveducate

Twitter- https://twitter.com/krchome58

Linkedin- https://www.linkedin.com/in/chowdhurykaushik

Github- https://github.com/krchome

Blogger- https://krchome1.blogspot.com/

Live Journal- https://ext-5537239.livejournal.com/

MIx - https://mix.com/kaushikroychowdhury

#KaushikRoyChowdhury #OrchardCoreCMS #OrchardCoreCMSTutorials https://www.skillshare.com/r/profile/Kaushik-Roy-Chowdhury/5724896

#kaushikroychowdhury #orchardcorecms #orchardcorecmstutorials #dotnet #cms

How to Create a New Decoupled Orchard Core CMS Website - [Part 3]
1.20 GEEK