I've seen a few examples but they are outdated.
I'm using standard template for module creation with View, Edit, Setting.
I'm adding a new control TestPage : MyModuleBase
in mymodule.dnn
<moduleControl>
<controlKey>TestPage</controlKey>
<controlSrc>DesktopModules/mymodule/TestPage.ascx</controlSrc>
<supportsPartialRendering>False</supportsPartialRendering>
<controlTitle>TestPage.ascx</controlTitle>
<controlType>Edit</controlType>
<iconFile />
<helpUrl />
<viewOrder>0</viewOrder>
</moduleControl>
then on View on button click:
this.Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.TabId, "TestPage"));
and it redirects to /mymodule/ctl/TestPage/portalid/0 and it is empty.
What is wrong in my settings?
You have to use EditURL instead of NavigateURL in order to specify you want to load a specific control for the module that the moduleID is specified in the URL.
Related
I wanted to have a custom URL for the pages displayed in edit mode.
Yes, this is possible. You need to change some places in web.config:
<episerver.packaging protectedVirtualPath="~/episerver" />
and
<applicationSettings uiUrl="~/episerver/CMS/" />
and
<virtualPathProviders> entry for ProtectedModules, <add name="ProtectedModules" virtualPath="~/episerver/" />
and all the <location> elements pointing to "episerver...".
I have inside my MyVerifyReadyDlg.wxs checkbox control defined as following:
<Control Id="REMOVELOGSFILESCHECKBOX" Type="CheckBox" X="170" Y="170" Width="80" Height="17"
Property="REMOVINGLOGSPROPERTY" CheckBoxValue="0" Text="Remove logs files">
<Condition Action="show">Installed</Condition>
<Condition Action="hide">NOT Installed</Condition>
</Control>
and inside Product.wxs I have defined the property as:
<Property Id="REMOVINGLOGSPROPERTY" Secure="yes"/>
and also inside Product.wxs I have this component to remove a log files on uninstall:
<Component Id="logsFolderComponent" Guid="*" Directory="logsFolder">
<Condition>REMOVINGLOGSPROPERTY</Condition>
<RemoveFile Id="allLogsFiles" Name="*.log" On="uninstall"></RemoveFile>
</Component>
The problem is: it does not set the property(stays null) when I check the checkbox during an uninstallation, but if I use the checkbox on installation it removes the log files.
How I can set the property on uninstall?
Properties aren't automatically preserved anywhere between install and later operations. WiX provides the "remember property" pattern for this.
http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern/
Having trouble creating a manifest for a couple of modules. The module controls live in:
DesktopModules/Org/ItemManagement
Each module does related but different things, and so should be draggable onto a page as a standalone module.
After looking around, I think I need to create multiple package definitions in the manifest, so I have done that. I have then uploaded the controls and the manifest to the above folder, and installed using Host->Extensions->Create New Module->From Manifest
It seemed to installed okay, appears in the extension list, and appears in the module bar to add to a page; however, when I drag to a location on the page, the page errors on the call to /DesktopModules/internalservices/API/controlbar/AddModule with "The requested resource does not support http method 'GET'.".
If I put each control in a separate folder and install using Host->Extensions->Create New Module->From Control everything works fine, however this is not ideal as all controls will eventually share resources liek CSS, scripts etc., and ideally I want them to just get them from the ModulePath, just so everything is in one place.
Is there anything obviously wrong in my manifest?
<?xml version="1.0" encoding="UTF-8"?>
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="Org_My_Items" type="Module" version="01.00.00">
<friendlyName>My Items</friendlyName>
<description>
My Items grid
</description>
<owner>
<name>Org</name>
<organization>Org</organization>
<email>noreply#example.com</email>
</owner>
<components>
<component type="Module" version="01.00.00">
<desktopModule>
<moduleName>My Items</moduleName>
<foldername>Org</foldername>
<moduleDefinitions>
<moduleDefinition>
<friendlyName>My Items</friendlyName>
<moduleControls>
<moduleControl>
<controlSrc>DesktopModules/Org/ItemManagement/MyItems.ascx</controlSrc>
<controlTitle>My Items</controlTitle>
<controlKey>MyItems</controlKey>
<controlType>View</controlType>
</moduleControl>
</moduleControls>
</moduleDefinition>
</moduleDefinitions>
</desktopModule>
</component>
</components>
</package>
<package name="Org_My_Details" type="Module" version="01.00.00">
<friendlyName>My Details</friendlyName>
<description>
My Details summary display
</description>
<owner>
<name>Org</name>
<organization>Org</organization>
<email>noreply#example.com</email>
</owner>
<components>
<component type="Module" version="01.00.00">
<desktopModule>
<moduleName>My Details</moduleName>
<foldername>Org</foldername>
<moduleDefinitions>
<moduleDefinition>
<friendlyName>My Details</friendlyName>
<moduleControls>
<moduleControl>
<controlSrc>DesktopModules/Org/ItemManagement/MyDetails.ascx</controlSrc>
<controlTitle>My Details</controlTitle>
<controlKey>MyDetails</controlKey>
<controlType>View</controlType>
</moduleControl>
</moduleControls>
</moduleDefinition>
</moduleDefinitions>
</desktopModule>
</component>
</components>
</package>
</packages>
</dotnetnuke>
I have a similar package setup with my open-source DNN Social module. Compare what I have as it is working to install two desktop modules, each with their own module definition, and living in the same folder.
One thing I noticed is that you have specified a controlkey for your module controls. It is my understanding that DNN looks for one control within each moduledefinition with an empty control key <controlKey /> which denotes the default view of the module. Maybe that is an issue?
I am using the Obout Suite in a website.
I have a SuperForm control in which I have inserted some controls like BoundFields or DateFields.
The problem is that when I select a date at the DateField Calendar, the textbox associated doesn't refresh the value of the date.
I have something like:
<obout:SuperForm ID="SuperForm2" runat="server" AutoGenerateInsertButton ="true" AutoGenerateEditButton="false" AutoGenerateDeleteButton="false" AutoGenerateRows="false" DataKeyNames="IdDocumento" DefaultMode="Insert" Width="525" DataSourceID="SqlDataSource2">
<Fields>
<obout:BoundField DataField="DocumentType" HeaderText="Name" FieldSetID="FieldSet1" />
<obout:DateField DataField="OrderDate" HeaderText="Order Date" FieldSetID="FieldSet2" DataFormatString="{0:MM/dd/yyyy}" ApplyFormatInEditMode="true" />
<obout:DateField DataField="RequiredDate" HeaderText="Required Date" FieldSetID="FieldSet2" DataFormatString="{0:MM/dd/yyyy}" ApplyFormatInEditMode="true" />
</Fields>
<FieldSets>
<obout:FieldSetRow>
<obout:FieldSet ID="FieldSet1" />
</obout:FieldSetRow>
<obout:FieldSetRow>
<obout:FieldSet ID="FieldSet2" />
</obout:FieldSetRow>
</FieldSets>
</obout:SuperForm>
The tag prefix is:
<%# Register TagPrefix="obout" Namespace="Obout.SuperForm" Assembly="obout_SuperForm" %>
The "obout_Calendar2_Net.dll" is referenced by the solution.
Am I forgotting something?
Thanks in advance.
Cartojal
Well, finally I found the solution. If you are using .net 4.0, like me.... you must to add the attribute clientIDMode="AutoID" to the section "pages" at the web.config file:
<pages clientIDMode="AutoID">
....
</pages>
This generate the asp.net controls ids like past versions of .net
I have two files Product.wxc there i wrote
<Property Id="CheckBoxProp">
and Custom Action
<InstallExecuteSequence>
<Custom Action="MyCustomAction" After="InstallInitialize">
CheckBoxProp=1
</Custom>
</InstallExecuteSequence>
In another file MyCheckBoxDlg.wxc I wrote UI dialog there I described checkbox
<Control Type="CheckBox" Id="MyCheckBoxID" Width="125" Height="26" X="26" Y="124" Text="My text" Property="CheckBoxProp" CheckBoxValue="1" />
All publishs I wrote in another file where I have a DialogRef to MyCheckBoxDlg
When I start my installation customaction doesn't see change of value CheckBoxProp.
Help plz! I wait for your help.
CheckBoxProp is a private not a secure (public) property. Change it to CHECKBOXPROP and use the Secure attribute to get it listed in the SecureCustomProperties property.