DNN Module - Create Page for View.ascx - dotnetnuke

I have create a DNN Module using the Visual Studio DotNetNuke 7 C# Compiled Module template. When my module is installed, I would like to create a page for View.ascx. How can I do this? Can this be done when I upload the module in Host > Extensions?

From the Control Panel you should use the Add new page functionality, then place your Module on that newly created page.
Check out this video for how to Add a page in DNN7.
http://www.dotnetnuke.com/Resources/Video-Library/Viewer/Video/549/View/Details/How-to-add-a-page-in-DotNetNuke-7.aspx
And this one for how to adda module to a page
http://www.dotnetnuke.com/Resources/Video-Library/Viewer/Video/537/View/Details/How-to-add-a-module-to-a-page-in-DotNetNuke-7.aspx

To answer the question specifically about having this done automatically with the module, yes, you can, BUT you have to write code to do this and I only recommend it for special circumstances.
I've seen this done using an implementation of the IUpgradable interface in DNN to detect an initial installation and create the page using DNN API calls.
There is some detail in the Wiki about how IUpgradable works

Related

How to add reference to DotNetNuke Library/Framework in a C# Project

I am developing a mobile app that uses DNN on the backend. I want to create a Web API that receives a DNN UserID and returns the user's Profile Picture.
Most of the documentation and posts speak to developing Modules and focus on DNN Templates that are available.
All I want to do is add a reference to DNN Library in my Visual Studio Project so that I can access the DNN API. I right click on references yet can't find DNN.
How is this accomplished?
Thanks.
EDIT... I'm developing on the same server that DNN is running on.
It turned out it was a simple matter of pointing to the dll's I wanted to use in the bin subfolder of DotNetNuke.

Installed DNN Module - Not showing in dropdown to give link

I had an link in my DNN site Menu - pointing to aspx page of my installed module.
I replaced this link with an external link.
And now i wish to change back to old one - aspx from module. BUT am not getting that listed in the dropdown
How to get that back or I missed anything ? I could found the module still in that EXTENSIONS.
Please suggest
Rigin
I think you may be a little confused,
Modules are placed on pages, (One or mor module generally makes up a page.
Menu links refer to pages,
To add a module to a menu it must be on a page.
Once you have placed you module on a page you can select it from the select a web page drop down
A dnn module got 2 pages a view page and a settings page. So you must be sure that your module start's with the correct page.
So what you want is not possible the way you want it.
Best way for you is to control the page in your module. You can control this with for example a user controls(ascx). See image for a default module view.

How to use multiple container in single page in DotNetNuke?

I am using a CMS (DotNetNuke) for creating a web application. I am newbe for dotnetnuke.
I searched on net for add or create multiple container for a single page and also installed some package from dotnetnuke site. But there is a issue for add or create a container in a page.
I want to use three container for top, middle and lower container.
Can any one help me out to this.
Note : I am using dotNetNuke 7.0 version on my end.
I assume by "container" you are referring to Panes, locations where you place a module on a page?
I would recommend you look at the source code for some open source skins, including my own https://multifunction.codeplex.com/ that will likely help you understand how Panes are managed.

Get session of DNN in aspx file

I write a standalone aspx file and upload it to DNN website. I add a html module and make an iframe to that aspx file. How I should check DNN user login or not in aspx file? I think there are something in Session but it is empty when I print it out on aspx page.
The aspx file executes outside of DNN. There is no context for you to work with. A much better approach is to turn your .aspx into a .ascx and derive from PortalModuleBase as the start of a DNN module. You can add a proper module to the page and permission the module as you see fit and DNN will take care of all the authentication and authorization details for you.
A starting point for module development
I don't recommend it in this situation, but you can also emulate the approach I described for getting context in a web service.
https://stackoverflow.com/a/9164573/51851
If your aspx is within DNN's website you can simply use Request.IsAuthenticated to check if user is logged in or not.
But be warned, if you have friendly URL turned on - DNN 5x and above will hijack you aspx request.

Dot Net Nuke, custom module addition

I am new to DOT NET NUKE 6.0 and facing a problem. The scene is that I have created a very simple user control in Visual Studio(by using ASP.NET/C#). Now I just want to add it as module in my DNN portal. Task is simple but I don not know how to do. Any help, video link, site is appreciated. I am working in DNN 6.0
Thanks
There are a bunch of resources on the DotNetNuke.com site. Take a look at the wiki entry at http://www.dotnetnuke.com/Resources/Wiki/Page/module-development.aspx. It has links to a video series that should be helpful to get started.
If you already have a control, you should make sure that it inherits from PortalModuleBase, and use the Extensions module (under Host) to create a new module from the control. DNN will create the record for it, and even create a test page with the module on it for you.

Resources