Contents tagged with development
-
Changing the content type of existing content items
So you've got a bunch of Page content items in your Orchard instance, but nowadays Orchard is getting popular and everybody has Page content items. But you started to use Orchard before it got cool and Pages are now too mainstream. How can you make your existing Pages unique again? Well, you could change them to use you very own content type, BakelitePage!
-
Modifying another Orchard module's DB schema with SchemaBuilder
The SchemaBuilder, the service you use in migrations to modify the database schema of your module is a convenient tool. However, you can't use it directly to modify the schema of tables defined by other modules (this is commonly the case when wanting to add indices to other modules' tables) because SchemaBuilder automatically appends you module's name to the manipulated table's name... But this is very simple to overcome!
-
Migrating content part data to the infoset - upgrading your module to be Orchard 1.8 compatible part 2.
So you've already upgraded your Orchard module to be compatible with the upcoming 1.8 version. Since your parts now use the infoset to store data you also removed some records. But how to migrate data from the old database tables, that are otherwise not needed and should be removed? Let's see.
-
Upgrading your module to be Orchard 1.8 compatible
So what should I do with my module to make it 1.8 compatible? Although 1.8 is not yet here (1.7.2 just released) it's not too early to deal with this question, since without intervention your modules won't even compile with the latest (soon-to-be 1.8) Orchard source.
-
Orchard Brotips: having a big menu perfoming well
TL;DR: use custom links only.
-
Making sure your inline script is only included once when multiple content items are listed
It's a common scenario that you want to add a little piece of javascript to enrich your content part. You may find that putting it into a separate script file is an overkill or - because the script needs many parameters from the part's template - too complex. Thus, you go with an inline script. Good choice! But did you know that if multiple content items having your part are displayed on the same page your script will be injected to the markup multiple times? That ain't good, but there's a simple workaround.
-
Creating a hidden content part
You might want to have a content part hidden: that is, you not only don't want users to be able to attach it to content types but you don't even want user to see - and thus know about - it. This is the case if the part is something very technical or if it's only interesting for a single content type.
-
Did you know that themes can have dependencies too?
Of course themes can depend on another theme, by having the other theme specified in the BaseTheme directive in the Theme.txt file. What's more however, that themes can also have dependencies on modules: just use the Dependencies parameter like with modules in the Module.txt.
Dependencies: Orchard.jQuery
Not too complicated, right? Still it's something not obvious. Actually since jQuery is an always-on core module you don't need this, but if you have any other JS library in a module that you use in your theme you have to declare the dependency. You get the idea :-).
-
Content part development checklist
Make sure you don't forget anything if you develop a content part. Here's a high-level checklist you can run through so you don't forget anything: