Writing a custom Condition for Orchard - checking the tags on a page - published to GitHub and the Orchard Gallery
As promised in my first post about writing a custom Condition for Orchard, I've published the source code to GitHub and the Orchard modules gallery:
Just because I can, I've added an additional Condition to the module, that triggers off the Id of the content item (mainly because in some ways this is a strict subset of the functionality required for the tag based version). I've specified these as two distinct features within the module by using the following content for Module.txt:
Name: RW.Orchard.Conditions
AntiForgery: enabled
Author: Robert Wray
Website: http://robertwray.co.uk/
Version: 1.0.1
OrchardVersion: 1.10.0
Description: This module contains new conditions that can be used within Orchard
Category: Scripting
Features:
RW.Orchard.Conditions.Tag:
Name: RW.Orchard.Conditions.Tag
Description: Adds a condition to Orchard that allows checking against tags
Category: Scripting
Dependencies: Orchard.Conditions, Orchard.Tags
RW.Orchard.Conditions.ContentId:
Name: RW.Orchard.Conditions.ContentId
Description: Adds a condition to Orchard that allows checking against the items content id
Category: Scripting
Dependencies: Orchard.Conditions
the process of creating an Orchard Gallery account and making the module package available is something I'll document later, but, since I added the module to the gallery, I've then installed it via the Modules part of /Admin and it all works as it should do. I'll consider that a success!