Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

New custom control registration
Last Post 08/20/2010 9:30 AM by Albert. 5 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Albert
New Member
New Member
Posts:8


--
08/19/2010 3:13 PM

Hi.

How to register a new custom control in dmx resources, to be possible to redirect there from main dmx menu.

I've added new control under module definition with proper path, gave it key 'Assigment' and try to redirect there form new item added to xslt using node like this for my new item:

<

xsl:value-of select="./TabUrl/@Connector"/>ctl=Assigment&amp;mid=<xsl:value-of select="./DMXModule/@ModuleId"/>&amp;CollectionId=<xsl:value-of select="Collection/Entry/@EntryId"/>

but then got object null reference error. What more I have to set up ? 

Thank you for teh reply.

 

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
08/19/2010 3:56 PM
Hi Albert,

You're on the right track. Do the following:
1. Set the DMX to debug mode (log in as host and on the Main Options screen)
2. Note that under portals/[id]/DMX/Temp there is an Xml called lastrequestedmenu when you refresh your DMX page
3. Use that Xml to debug any Xsl you have. Your best bet is first to edit portals/[id]/DMX/Menu/DefaultMenu.resources and check until it works. Then copy the menu so you have a local copy of your work that won't be overwritten. That copy can be loaded as the default menu in the module settings.

If you have issues, let me know if the menu actually displays or not. And where you see the error appear if any.

Peter
Albert
New Member
New Member
Posts:8


--
08/19/2010 4:20 PM

Yes, I've added new item to the menu and can redirect - adding new items to the menu is not a problem here . The probelm is that I've created new custom control (like those in admin folder - 'attributes' or ' notifiactions' for ex.) and want to redirect user there using menu item.

How properly add a new control like attributes or notifiactions, etc. I found in your module to be able to redirect form the module using NavigateUrl node inside item, like this above?

I registered my control under module definition/Add control. But get null refernece -  I seems that there is something more to register - maybe in app resources. Now temporary I am redirecting to page/control outside DMX it is working very well, but I want may control to be a part of your module and be able to redirect to it from core menu.   

Thank you,

Albert.

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
08/19/2010 4:34 PM
Hi Albert,

OK. That should be possible (I can't see anything else you need to do to hook this up that way) but it falls under the realm of DNN module programming. Some tips:

1. Double check your record in ModuleControls with the others. Spot anything different?
2. Start with a blank screen with just a tag text to see if it loads (I do this to eliminate any problems with the controls I add to the ascx)

Albert
New Member
New Member
Posts:8


--
08/19/2010 5:29 PM
Hi Peter.

This solution is working - I've hided copy of one of your control under my custom name and it is working well.
So in my opinion, it is must be a problem in lack of property/method inside my control code-behind or some html element. What it should contains, except ModuleBase inheritance elements ?
One thing - maybe it is an issue - my code-behind is written in C#, but I suppose it doesn’t matter.

Thank you once more,
Albert.
Albert
New Member
New Member
Posts:8


--
08/20/2010 9:30 AM
OK. Here is the solution - also for applying C# control working with DMX module.
Note, that I even didn't have to register app_code subfolders to generate granular assemblies for c#. It is working with out that in my particular case.



http://local.dotnetnuke.c...e/posts/Default.aspx

Regards
Albert.
You are not authorized to post a reply.