Ready to Go
Latest Posts

DotNetNuke Tip #17, Disable Inline Editing in Text/HTML

Last Updated Wednesday, January 23, 2008 4:51 PM


DotNetNuke Tip #17, Disable Inline Editing in Text/HTML

With the latest releases of DNN, 3.3.* and 4.3.*, you may notice that when logged in to a page you have edit rights to that you can "edit" content in the text/html modules simply by clicking on them in the browser window and typing. Convenient, yes? Sometimes! Othertimes it can really be a pain in the rear, I'm a click happy person, I click places so I can get my scroll started, so that last thing I want is to begin editing content on my pages.

I figured I'd post a solution to disable this option in DNN. Currently this requires a recompile, though I know the core team is looking at how to make this an option for the Text/HTML module.

So here's what you need to do.

Download the Source Version of the Text/HTML project from DotNetNuke.com

Open the Project in VS 2003, I opened it in an existing DNN solution I had setup already.

Open the HtmlModule.ascx.vb file

Around line 196 you'll find the following code

lblContent.EditEnabled = Me.IsEditable

Comment that line out and add the following line

'lblContent.EditEnabled = Me.IsEditable
lblContent.EditEnabled = False

Recompile the module in release mode and use the newly created DLL in your environments. Always Test new code/dlls on a test instance before moving them into production. The above code worked fine for me, but please test for yourself first.

Stay tuned for more DotNetNuke tips, brought to you by Chris Hammond from Engage Software.

Posted from weblogs.asp.net/christoc
Recent Comments
There are currently no comments. Be the first to make a comment.
Saturday, July 04, 2009
About Me

Welcome to the web site of Chris Hammond, here you can find all of the recent blog posts I've made! For information about me check the About Chris Hammond page.

Buy My Book! Currently slated for a June 2009 release date

Tags
  1. 11 items are tagged with .net
  2. 6 items are tagged with 240Z
  3. 58 items are tagged with asp.net
  4. 44 items are tagged with Autocross
  5. 7 items are tagged with Baseball
  6. 9 items are tagged with Book
  7. 39 items are tagged with Boston Red Sox
  8. 29 items are tagged with Community Server
  9. 14 items are tagged with communityserver
  10. 17 items are tagged with Corvette
  11. 26 items are tagged with daily tips
  12. 92 items are tagged with Development
  13. 174 items are tagged with DotNetNuke
  14. 8 items are tagged with DotNetnuke Conference
  15. 25 items are tagged with DotNetNuke Development
  16. 11 items are tagged with DotNetNuke Tips
  17. 10 items are tagged with DotNetNuke Training
  18. 64 items are tagged with Fitness
  19. 108 items are tagged with Friends
  20. 43 items are tagged with Games
  21. 32 items are tagged with general Software Development
  22. 21 items are tagged with HDTV
  23. 18 items are tagged with Health
  24. 373 items are tagged with Life News
  25. 12 items are tagged with Microsoft
  26. 38 items are tagged with Music
  27. 11 items are tagged with OpenForce 07
  28. 84 items are tagged with Photography
  29. 9 items are tagged with Photos
  30. 89 items are tagged with Pictures
  31. 108 items are tagged with Places to See
  32. 20 items are tagged with Project 240Z
  33. 12 items are tagged with Project 350Z
  34. 19 items are tagged with Red Sox
  35. 19 items are tagged with Red Sox in St. Louis
  36. 7 items are tagged with Saint Louis
  37. 14 items are tagged with SCCA
  38. 7 items are tagged with School
  39. 416 items are tagged with SEO
  40. 203 items are tagged with Site News
  41. 8 items are tagged with Snow
  42. 7 items are tagged with Solo Nationals
  43. 28 items are tagged with St. Louis
  44. 270 items are tagged with Technology
  45. 29 items are tagged with Travel
  46. 17 items are tagged with Vista
  47. 16 items are tagged with Weblog
  48. 8 items are tagged with World Series
  49. 16 items are tagged with Xbox360
  50. 11 items are tagged with Zune