Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Container ModuleID - Alternatives to get a unique and permanent IDContainer ModuleID - Alternatives to get a unique and permanent ID
Previous
 
Next
New Post
2/10/2011 10:55 AM
 
Aloha

I'm trying to build a container with a voice reader service that has the following details:

A Button to activate the voice reader and read the content specified within an HTML elemnt (ex.<div>)
After pressing the button, the external voicereader service gets the Absolute URI and the HTML Element ID that he's instructed to read.
Example: <div id="rs_123">some text</div> at http://someserver/dnn/Home/tabid/40/portalid/0/Default.aspx

the id "rs_123" has to be an unique and permanent ID for the HTML element, otherwise the voicereader will not find the specific content to read.

I'm currently generating that ID using the ModuleID property, but using this property obligates me to change the cachetime of the TEXT/HTML module to 0 seconds as an alternative to the default 1200 secs, otherwise every http request will return a null ModuleID.

The present code is:

01.<%  Dim ConModule As DotNetNuke.Entities.Modules.ModuleInfo = DotNetNuke.UI.Containers.Container.GetPortalModuleBase(Me).ModuleConfiguration%>
02.<div class="TituloPicotado" id="ler_<%= ConModule.ModuleID%>">
03.//....
04.        <div id="readspeaker_button_<%= ConModule.ModuleID%>" class="rs_skip">
05.            <a accesskey="L" href="http://app.readspeaker.com/cgi-bin/rs...customerid=4950&lang=pt_pt&readid=ler_<%= ConModule.ModuleID%>&url=<%= HttpContext.Current.Request.Url.AbsoluteUri %>"
06.                target="_blank" onclick="readspeaker(this.href+'&selectedhtml='+escape(selectedString), 'rs_<%= ConModule.ModuleID%>'); return false;">
07.                <img style="border-style: none" src="http://media.readspeaker.com/images/b..."
08.                    alt='Ouvir com ReadSpeaker' title='Ouvir com ReadSpeaker' /></a>
09.        </div>
10.        <div id='rs_<%= ConModule.ModuleID%>'>
11.//content
12.</div>

Can anyone advice me with some other way besides the ModuleID to define a unique and permanent ID to the html element and not having to put all HTML/TEXT with a 0 seconds default cache time ?
 
Thank you
 
New Post
2/10/2011 1:07 PM
 
Maybe I should move this post to another section ?..
 
New Post
2/11/2011 4:59 AM
 
I think you should use

ModuleControl

In DNN 5
Thats what I changed to for DNN 5 for my simple title SKO:
http://dnnskinextensions.codeplex.com...
 
New Post
2/14/2011 5:32 AM
 
thanks for the tip. I've used ModuleControl and the UniqueID property but the values returned are somewhat like: dnn$ctr389$HtmlModule. The javascript to voiceread the container doesn't behaves well with the '$', is there a way to strip them down and only get the id 'ctr389' ? Thank you.
 
New Post
2/14/2011 9:02 AM
 
Anyways, my biggest problem still persists. If I change the cache time from 0 to 1200 seconds, the module won't render the ModuleID unless the cache time is 0 seconds. It returns -1 value, you can check an example here: http://www.madeira-edu.pt/tabid/1176/language/pt-PT/Default.aspx look for the "Ouvir" (Listen in english) button.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Container ModuleID - Alternatives to get a unique and permanent IDContainer ModuleID - Alternatives to get a unique and permanent ID


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out