Custom module not shown in main menu
hai,
I have created a Product module in my sitefinity4.1 project using the SDK sample.When I run the project an entry is created in the SystemConfig.config as
<add title="Products" type="ProductsModule.ProductsModule" startupType="OnApplicationStart" name="Products" />
but the module is not shown in the horizontal main menu.Their for I can't see the module and cannot navigate to it.How can I achieve this.I had came across many posts but no use.
Please help me....
Hi Rakesh,
Take a look at this post. It should help you
Regards,
Anton
Thanks Anton.
When I done that I got an error.
"
Rakesh,
This error indicates that your custom module has persistent class that was not enhanced with OpenAccess enhancer.
Please check this forum post. There are some changes that have to be done in your *.csproj file to include OA enhancer.
Also, make sure that the OpenAccessPath is specified correctly and you are using an appropriate SDK version, i.e if you are using Sitefinity 4.1 SP2 the SDK version must be Sitefinity SDK 4.1 SP2
I hope this helps,
Anton
Hai Anton,
Thanks for your reply.
Now their is no error and I added the ResourcesId but the same situation.What else I have to do?
Shall I give you My Project ?
Please help me I am in deep trouble.....
Rakesh,
Could you please share the configuration of this module from SystemConfig.config (screenshot or text)?
Also, it would be great to see top lines (with namespace and class definition) of your *module*.cs and *resource*.cs files.
Regards,
Anton
Hi Anton,
I would guide you trough the steps that should get your products module up and running in no time.
You should have the SDK for that version of Sitefinity too installed with Telerik RadControls and OpenAccess. too. This is important as their assemblies are referenced in the products module.
1.Create your project in the Project manager. make sure you log in backend of the site( the requirement to have a functioning project).
2. Edit your Sitefinity project in Visual Studio.
3.Right click on the solution and add existing project. Navigate to the SDK and select the products module csproject file.
4. Right click on the name of the product module project ( ProductsCatalogSample ) and Build ( it is very important to never click Rebuild as it will remove some references).
5. If you experience build error you should expand References and check the version of the assemblies. They must be the same version as the same assemblies used in your SitefinityWebApp! You can check the version in the properties panel.
6.Now you should reference the ProductsCatalogSample.dll in SitefinityWebApp. And build the whole solution ( don`t rebuild if you do the references to Facebook.dll and NewtownsoftJson.dll will be removed and you got to reference them again )
7. To register the module go to App_Data/Sitefinity/Configuration/System.config and enter this line:
<
add
title
=
"Products"
description
=
"Products"
resourceClassId
=
"ProductsResources"
type
=
"ProductCatalogSample.ProductsModule"
startupType
=
"OnApplicationStart"
name
=
"ProductsModule"
/>
<
UserProperties
OpenAccess_ConfigFile
=
"App.config"
OpenAccess_ConnectionId
=
"DatabaseConnection1"
OpenAccess_Enhancing
=
"True"
OpenAccess_UpdateDatabase
=
"False"
OpenAccess_EnhancementOutputLevel
=
"1"
/>
</
VisualStudio
>
</
ProjectExtensions
>
<
PropertyGroup
>
<
PostBuildEvent
>
</
PostBuildEvent
>
<
PreBuildEvent
>
</
PreBuildEvent
>
</
PropertyGroup
>
<
PropertyGroup
>
<
OpenAccessPath
>$(SolutionDir)..\..\..\..\..\Common\Dependencies\</
OpenAccessPath
>
</
PropertyGroup
>
<
Import
Condition
=
"Exists('$(OpenAccessPath)\OpenAccess.targets')"
Project
=
"$(OpenAccessPath)\OpenAccess.targets"
/>
</
Project
>
Hi Rakesh,
Then have you added the control registration again after you removed them? The system is restarting should expire in some time. I have added the part with System is Restarting solution because it is not a problem related to the module, but with the restart of Sitefinity. Wait some time and try to browse the Sitefinity backend again. Alternatively you can restart web.config by making a dummy change in it ( like pressing space and saving ).
You have the module installed successfully when you enter the backend you will see it.
Kind regards,
Stanislav Velikov
the Telerik team