2
votes

I am beginner to Orchard. My purpose of starting this discussion is, to make beginners aware about Orchard Fundamentals.

I am currently Developing on web site using Orchard. But most of the times I am facing difficulty in rendering contents and how to place content on front end. As well, use of content items, content types and modules. Usually, I get confuse in using all these things. For example : I have created new content type for displaying latest post on my site, with date and user's profile picture. So for that my question is, "Is it right that I have created content type for it? or should I have to make module? and if yes than can I use my content type as a widget on my homepage? "

FYI: I went through the documentation and plural sight's video. But I was not able to clear above fundamentals.

Sorry for any inconvenience or any stupid questions, but at this time it seems bit complex for me. Can anybody please help me to clear my fundamentals of orchard?

Thank you, Sohil Shah

1
I'm afraid if the fundamentals of Orchard could be easily written down in an SO answer they probably would have been already. Try following this set of tutorial blog posts skywalkersoftwaredevelopment.net/blog/… - Hazza

1 Answers

0
votes

I am currently Developing on web site using Orchard. But most of the times I am facing difficulty in rendering contents and how to place content on front end. As well, use of content items, content types and modules. Usually, I get confuse in using all these things. For example : I have created new content type for displaying latest post on my site, with date and user's profile picture. So for that my question is, "Is it right that I have created content type for it? or should I have to make module? and if yes than can I use my content type as a widget on my homepage? "

Is it right that I have created content type for it? or should I have to make module?

Sure, a ContentType just means that you can create instances of that specific type through the CMS.

or should I have to make module?

Do you want to re-use your contenttype across different projects? If so, then you should create code that creates the contenttype for you (in a migration script) and put that in a module.

can I use my content type as a widget on my homepage?

Yes, you need to enable your contenttype to be a widget. You can do this also with a migration script like so (add the WidgetPart and settting Widget stereotype:

ContentDefinitionManager.AlterTypeDefinition(
    "MyWidget", 
     x => x.WithPart("WidgetPart")
           .WithSetting("Stereotype", "Widget")
);