I made a custom module in orchard CMS.I want this custom module as startup module when i run my site but orchard always makes home page as start up.how can i make my custom module as Startup in orchard.My module is simple Mvc application using Entity frame work as db .I am pretty new to Orchard i am learning it.Any Help would be appriciated Thanks Advance
In order to steal the home route, you will have to write your own route, and give it high priority. Removing the alias for the current home page will also help.
If your module contains a content type and that content type has an autoroute part then there will be a checkbox in the edit content admin page that says 'Set to homepage'.
You can create lots of different types of modules in Orchard and not all of them contain content types. You can add an autoroute part to a content type that doesn't have one.
It is not true to say "set a module as start up".a module is not an stand alone mvc application, but it is a way of extending existing functionalities.
you can create a ContentType inside your module and orchard will provide the dashboard user with creating of new instance of your type.then user can set this instance as home page content.
to write your own ContentType check here.
Related
How can I make new page at the same time as the plugin is installed? Later that plugin should be at newly created page. Is it possible to do this in DNN?
Thanks.
When the module is installed you can add a new page in the UpdateModule process, using something like
TabController.Instance.AddTab(...)
But I am not sure if you can also add the module itself on that page, as the install progress is propably not fully done yet. You have to try, you need a new Module instance for that and a record in TabModules with the TabID and the ModuleID.
Have a look at the IUpgradeable interface.
Happy DNNing!
Michael
I am new in DotnetNuke. So, first of all I don't know all terminology. My problem is content of Webform.aspx doesn't display in Module.
Let me describe the steps so it can be easy to track the missing steps if any.
1- Created a project of DotnetNuke 7 C# Compiled Module. Path:
F:\website\dnndev.me\desktopmodules\DNNModule2
2- Added a WebForm1.aspx and add a line "Hello World"
3- Build project, DNNModule2_00.00.01_Install.zip is generated in
F:\websites\dnndev.me\DesktopModules\DNNModule2\DNNModule2\install
4- Added extension in http://www.dnndev.me/Admin/Extensions. It added
successfully in Modules.
5- Created New Page and added DNNModule2 by drag and drop. But it
doesn't display content "Hello World" of WebForm1.aspx.
Do I need to set any property while I am adding Module in New WebPage?
Also suggest if my flow is wrong. I will be happy to improve.
Thanks
For a DNN module to work properly you need to work with an .ascx user control. Typically these will inherit from the PortalModuleBase class. There are a few options, but that is the most common.
.aspx pages themselves can exist in DNN, however, they are ONLY available if you access them directly, and not through the module process.
Your user control, when setup should be part of the .dnn manifest and referenced with a <controlkey/> value. (As in no control key defined, to be the default view of your module.)
If you are not using a template, this one is a great example.
I want to add a Razor module to my CMS which was created by DNN. In that razor module I need to show data from database. What would be the best way to do it.
Need a help
Thank you,
Nayanajith
Add an instance of the Razor Host module to a page, and start from there. If you look at the Wiki on dnnsoftware.com, you'll find some more stuff.
For more than complicated uses, that a look at the 2sxc module free at sexycontent.codeplex.com.
If you are planning to get data from the DNN database, you'll want to learn about the DNN api.
I found a simple solution to my problem.
I created a Empty ASP.NET project in visual studio.
Then added Razor page in to that particular project (remember to
delete configuration file).
Then I use connection string and created normal database access class
and added functions which I needed.
Then published the ASP.net Web application and put it in to the DNN
DesktopModule/RazorModule folder and created the module from the DNN
admin.
Now it works fine :)
I am trying to design an orchard theme in which i need to attach some Content Part to MenuItem to add some extra info for that.I did the process of adding part as i do inside module ,but strangely enough my view didn't get displayed.after hour's of debugging i figured out that my part's editor shape (eg:Parts_MenuItemMetaPart_Edit) is added to ShapeTable of my frontend theme rather than admin theme(TheAdmin) and thus my attached part editor not displayed.so is there any possibility to create a content part from within theme?if yes, how ?
Just found this link : https://github.com/OrchardCMS/OrchardDoc/blob/master/Documentation/Add-Custom-Settings-to-your-Theme.markdown
from the link above :
... You may be wondering why we don’t just use a driver like we usually do for a parts editor template. This is due to the fact that to call the Editor method of your Driver and return a shape, you need to have specified in the Placement.info that you want to do that. Since this theme is not active in the admin section of Orchard, our themes Placement.info file is never run hence a Driver would never display anything...
So the solution is to add ActivatingFilter in ContentPartHandler like this :
Filters.Add(new ActivatingFilter<MyPart>("Site"));
for more info follow the link provided.
I am building a module for dot net nuke.
It is similar to a HTML module but with some customizations. The user would add it multiple times on a page. I would like to create a hyperlink that the user can use to view the each one of the modules individually.
I want to add functionality so that a particular module can be displayed with its contents as if it were added to a page.
e.g I add the module 3 times on /News.aspx:
Article1
Article2
Article3
I would like these urls to work (without actually creating those pages(:
/News/Article1UniqueKey
/News/Article2UniqueKey
/News/Article3UniqueKey
The Unique key would be the module ID by default or a string that the user would enter in the edit page for a module.
How do I achieve this.
This could be achieved in a few ways. The most common way is using FriendlyURL provider, such as one for Ifinity's URLMaster. You can find a number of providers available, with source, at http://www.ifinity.com.au though things will change a little bit with DNN 7.1 as URLMaster is being integrated into the product, I believe the providers will just need to be recompiled against DNN 7.1 instead of older versions.