Microsoft MVP - Orchard CMS Developer

RSS Twitter Google+

Orchard Web Developer - David Hayden

I develop exceptional websites based on Orchard CMS. I create Orchard Themes, custom Orchard Modules and Widgets, and convert WordPress and HTML Templates to Orchard Themes.


Contact Me: david@sarasota.me

Tweets
Quick tip on using WorkContext.CurrentTheme and Html.ThemePath in Orchard CMS. http://t.co/9M8c4ke9 #orchardcms
JetBrains released dotPeek 1.0, their Free .NET decompiler and assembly browser. http://t.co/O65OqcLQ
Amazon Web Services now supports SQL Server and .NET Applications. http://t.co/nNZSd9Z9
After many hours of KoA and Skyrim, I need to find a new RPG for me and the kids. Thinking an older one - Dragon Age: Origins.
Orchard 1.4.1 Released! Download: http://t.co/KDphWq7U Blog Post: http://t.co/MnVvVhHh #orchardcms
Donating my remaining 103 .NET and Software Development books to local public library today. Hope they make a difference!

Creating a Google +1 Part and Custom Module in Orchard CMS - Part 1

Earlier we mentioned how we upgraded our Orchard Website to Version 1.2. At the same time we added Google +1 and Twitter Icons to Orchard blog posts by modifying the shapes that compose a blog post. In that post we mentioned that modifying the shapes was only 1 way to add social networking icons to Orchard blog posts and developers could certainly create custom Orchard Content Parts and Widgets to do the same thing. Well, in this series of blog posts we will show you how to create a simple Google +1 Content Part in a custom Orchard Module to display Google +1 Buttons on your Orchard Pages, Blog Posts, and other Content Types!

Google +1 Button On Orchard Blog Posts

Let's first start with the results. The goal is to have a Google +1 Button on all Orchard Blog Posts.

Orchard Blog Post with Google +1 Button

To make this easy, we will develop a Google +1 Content Part that we can attach to any Content Type. Here is the Google +1 Part ( Google Plus1 ) attached to the Blog Post Content Type.

Orchard Content Part Attached to Orchard Blog Post Content Type

Content Parts can be added via custom Orchard Modules that you install either through the Orchard Gallery or manually copy to the Modules Directory of your Orchard Website. We will create a custom Google +1 Module that installs and enables the Google +1 Part in the Orchard Website.

Orchard Content Part Attached to Orchard Blog Post Content Type

Google +1 Custom Orchard Module

During the development of this Google +1 Content Part and custom Orchard Module we will be creating a few items that will get you familiar with Orchard Development.

Custom Orchard Module in Orchard CMS

By the end of the blog post series you will understand the basics of creating a Content Part ( GooglePlus1Part.cs ) and registering it with Orchard via the Migration.cs file. You will understand how the Content Part Driver ( GooglePlus1PartDriver.cs ) renders the shape ( GooglePlus1Part.cshtml) and how the Placement.info file helps determine where the shape gets rendered in the final blog post or page. Last, we will customize and package the module and add it to the Orchard Gallery.

We hope you follow along!

TOP! © Copyright Sarasota.me
FOLLOW ME:
TWITTER