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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesRestrict Module To Public Pages OnlyRestrict Module To Public Pages Only
Previous
 
Next
New Post
2/1/2013 6:12 PM
 

I have developed a custom tracking module that I would like to add to all of the pages on my DotNetNuke portal.  I can do this easily, but I would like to restrict parts of the code from running when a user browses to an admin/host page...Essentially, I only want to track publicly visible pages.

Is there a way to determine (in the load event) whether the page being loaded is and admin/host page so that I can prevent my code from tracking visits to these pages?

 
New Post
2/1/2013 6:36 PM
 
There is no such thing as an admin/host page. The admin modules can be placed anywhere.

However you said: "Essentially, I only want to track publicly visible pages.". I don't know the precise detail, but I would do exactly that. Pull up the page's permissions and see if it is available to everyone.

You might need to remember that individual modules can override those permisisons settings. Just because everyone can see the page they may not be able to see everything on it.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
2/7/2013 9:10 AM
 
Hi,

" publicly visible ."
I presume you are tracking for non-registered or guest users....?

In that case, on page load you can check for the user id of the current user.
If its '-1', then its a non-registered or a guest users.
or if its a natural number it may be a registered user.

I hope this answers your query.

Thanks

Cheers..!!!

Amit Mohanty
Mindfire Solutions
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesRestrict Module To Public Pages OnlyRestrict Module To Public Pages Only


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