Join our DNN Community    (Newsletter, Tips, Tricks and Forums for DNN Skins & Modules)

 


 
Microsoft Gold Certified Partner - DNN Benefactor

DotNetNuke Powered! 


Friday, December 05, 2008 Register · Login · Contact · Search:  
Company Solutions Portfolio Contact
Forums
Tips and Tricks
Discussion of the popular 'Tips and Tricks' from the Newsletter. Questions or comments regarding the provided tips, or other general tricks of the trade.
Subject: How To Utilize myvar = [ModuleId,System] in a NON-ListX Module
You are not authorized to post a reply.
 
Author Messages
pauldes
Immortal
Posts:1392

08/14/2007 5:01 PM Alert 
Compliments of the brain of Kevin Schreiner.....

Change the first line of your container to:

<%@ Control AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Containers.Container" %>

then - add this block into your page

<script language="VB" runat="server">

Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Dim myObj As DotNetNuke.Entities.Modules.PortalModuleBase

myObj = GetPortalModuleBase(Me)

If myObj.Settings.ContainsKey("Generate") Then
Me.Response.Write(myObj.Settings("Generate").ToString.Replace("[ModuleID,System]", myObj.ModuleId.ToString))

End If

End Sub

</script>

Okay - now what this will do is add the generated code into your page - you should probably only use this for script values until i discover how to replace the header and footer. Once that is in your container execute this:

nsert into modulesettings select 13615,'Generate','<script language=javascript>var myTest=[ModuleID,System]</script>'

only - 13615 should be YOUR module id.

You then end up with myTest=xxxx for your module

ListX....makes you look brilliant, even though you're not.
You are not authorized to post a reply.
Forums > Dotnetnuke > Tips and Tricks > How To Utilize myvar = [ModuleId,System] in a NON-ListX Module



ActiveForums 3.6
Latest Post
 
At R2integrated (formerly Bi4ce), we take support seriously.  That's why we support our customers and DNN community with daily monitoring from our experienced engineering team.  We ask that the first step taken is to read the relevant documentation and support forums prior to submitting any questions that may already be available or have been answered.  We ask that you review the documentation that we provide for our products before posting a question.

The Forums are for our customers to chat, exchange ideas and strategies, and submit feedback.  Please be sure to perform keyword searches for previous related forum responses.

To be helpful when submitting a new item, please include the following: 
  1. DNN Version
  2. Module Version
  3. Admin Log Viewer Information
  4. Environment detail: Operating system, .NET framework version, database and version, IIS version, Browser version (if appropriate)
We always try to respond quickly and monitor the forums daily during business hours (EST).  Occasionally, requests for a specific project requirement may not apply for the free support offered. For project specific support please submit via our Information Request form.

Thank you for using our Forums.

Click here to register for the Forums
 
© 2008 by R2integrated (formerly Bi4ce) | DNN® is a registered trademark of DotNetNuke Corporation