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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Can I add the print function onto controls other than the first one in a module?Can I add the print function onto controls other than the first one in a module?
Previous
 
Next
New Post
7/21/2006 4:44 AM
 
cathal wrote

Note: I'm presuming you mean the default view of a module as the first control. Basically print appears to the anonymous user, and when you're in edit mode it's not an option (i.e. why would you want to print an admin screen?). If you want to use print on multiple module ascx's, then make sure the permissions are set to SecurityAccessLevel.Anonymous ). If you want to alter this behaviour take a look at the LoadActions() sub in components\modules\PortalModuleBase.vb 

Cathal

 



Is that page permissions or .ascx permissions?

It is likely that my subsequent .ascx pages were created from the default edit page.
 
New Post
7/21/2006 8:04 AM
 

It's ascx permisssions - you are explicitly deciding who can access your controls. The normal development mechanism is to have a primary ascx (usually named what your module is doing e.g. mywidget.ascx). This then set's up access to the other related ascx's in the ModuleActions property e.g in this example below mywiget.ascx add's a menu item for 'add content' but makes it only accessible to user's with edit permissions).

 Public ReadOnly Property ModuleActions() As Entities.Modules.Actions.ModuleActionCollection Implements Entities.Modules.IActionable.ModuleActions
            Get
                Dim Actions As New Entities.Modules.Actions.ModuleActionCollection
                Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.Actions.ModuleActionType.AddContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl(), False, Security.SecurityAccessLevel.Edit, True, False)
                Return Actions
            End Get
        End Property


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
7/21/2006 9:00 AM
 
I think I understand what you are saying but if I change the code to try and put the actiontype.printmodule with a security access of anonymous the print icon/functionality still doesn't appear on the other .ascx controls.

Sorry for sounding completely thick, but I am at a complete loss of how to acheive this.

Also, are "edit" controls only meant for admin tasks and if so, I don't see why you shouldn't print them if you have access.


Mike
 
New Post
7/30/2006 9:57 AM
 

Set the page to anonymous then add the

 ModuleConfiguration.DisplayPrint = True

ex.

Public ReadOnly Property ModuleActions() As Entities.Modules.Actions.ModuleActionCollection Implements Entities.Modules.IActionable.ModuleActions

Get

ModuleConfiguration.DisplayPrint = True

End Get

End Property

 
New Post
8/2/2006 9:29 AM
 
That worked!

The print icon now shows.

A couple of questions :

1) I didn't need to set the ascx control or page to anonymous. It just worked. Is this O.K.?

2) Now that the print button is displayed how can I insert my parameters into it's functionality e.g.

before pressing the print button, I have a URL with /TaskID/2/ in it. As soon as I click the button, I lose the this information from the new windows URL.

How do I tell DNN to preserve this value?

Regards


Mike

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Can I add the print function onto controls other than the first one in a module?Can I add the print function onto controls other than the first one in a module?


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