Adding Custom Feature

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/17/2010 7:47:22 AM
Gravatar
Total Posts 22

Adding Custom Feature

I hope someone can help with this.

I'm using this feature definition file to add my new feature to my mojoportal site <?xml version="1.0" encoding="utf-8" ?>
<featureDefinitions>
<featureDefinition
featureGuid="B455558C-4D09-4A17-ABDF-F8466BB84ECC"
supportedDatabases="MSSQL"
resourceFile="ADReportListResources"
featureNameReasourceKey="FeatureName"
controlSource="ADReportList/ReportList.ascx"
sortOrder="100"
isCacheable="true"
defaultCacheTime="360"
excludeFromFeatureList="false"
isSearchable="false"
searchListNameResourceKey=""
icon="blank.gif"
>

<featureSetting
resourceFile="ADReportListResources"
resourceKey="AllowEmailLabel"
defaultValue="true"
controlType="CheckBox"
controlSrc=""
helpKey=""
sortOrder="100"
regexValidationExpression=""
/>

</featureDefinition>
</featureDefinitions>
 

I have a resource file named ADReportListResources.ascx and it's been copied to the App_GlobalResources folder under Web - it contains the resource string AllowEmailLabel.  When I add the feature using the definition script the feature is created but if I add it to a page and then go to change its settings I can see the check box but there is no label showing next to it.

I'm sure I've missed something really simple but just can't figure out what it is.

Thanks for helping me out.

Suzy 

3/17/2010 8:16:55 AM
Gravatar
Total Posts 190

Re: Adding Custom Feature

You could try changing that resource file extension from .ascx to .resx, though I'm guessing that might just be a typo in your post. Otherwise, I'd say double check your spelling for everything else.

3/17/2010 8:32:33 AM
Gravatar
Total Posts 22

Re: Adding Custom Feature

You're right - that was just a typo in my post!  Sorry.

3/17/2010 9:52:14 AM
Gravatar
Total Posts 18439

Re: Adding Custom Feature

Hi,

If the file is named correctly and the key has a value I cannot think of a reason it would display as blank. If you have a key AllowEmailLabel with a blank value then it would be blank, but if it could not find the resource files it should actually render the key itself.

Remember that if you make changes to your .resx file you need to re-copy it to Web/App_GlobalResources either manually or by building the project if you are using post build event to deploy it.

Hope it helps,

Joe

3/17/2010 11:11:51 AM
Gravatar
Total Posts 22

Re: Adding Custom Feature

Hi Joe

I managed to fix that part.  I had previously tried adding the feature manually and had inadvertentyly left a blank feature setting in the database.  I cleared out all the entries in the database and managed to the definition file to work.  The feature and all its settings are now there.  Only problem is I can't see it in the list when I am trying to add content to a page.  The "exclude from feature list" isn't checked so I should be able to see it - shouldn't I? 

Thanks for your help.

Suzy

3/18/2010 12:03:08 PM
Gravatar
Total Posts 22

Re: Adding Custom Feature

I figured out what the problem was.  I hadn't removed the incorrect data relating to the feature from the SiteModules table.  I went in to the database and cleared everything relating to that feature from all the associated tables and then the definition script worked fine. 

Thanks to everyone who tried to help me out.

Suzy

You must sign in to post in the forums. This thread is closed to new posts.