This project is read-only.

Piotr Szmyd's AddThis Module + Orchard 1.4

Mar 12, 2012 at 11:00 PM

We used this module in a site we completed using Orchard 1.2.   We're using 1.4 for our latest project, and upon installing this module, I found that it doesn't work with 1.4, a result of the removal of RoutePart.  The AddThis module relies on that part...

I made the following changes to the source of this module, and it seems to work just fine, though I'm not quite sure what the containerPath line was adding to this module, so I removed it.  Piotr, if you're reading this, can you clarify?

In \Modules\Szmyd.Orchard.Modules.Sharing\Drivers\ShareBarPartDriver.cs

  1. Changed routepart reference and setting of the routePart to autoroutepart
  2. Added var titlePart = part.As<TitlePart>()
  3. Removed this line:
    string containerPath = routePart.GetContainerPath();
    I wasn't sure what containerPath was actually getting us, maybe Piotr can clarify
  4. Removed this portion from the line where containerUrl is set: + "/" + (containerPath ?? "")
  5. Changed routePart.Slug to routePart.Path
  6. Changed routePart.Title to titlePart.Title

I'll do some more messing with it, but it seems to be all I needed.  If someone can clarify the need for containerPath, that'd be great...

Jul 17, 2012 at 2:30 AM

Hey,

Thanks for posting this! Where you able to get this resolved?