DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Setting Default Value for "Replace Tokens" on HTML Modules

 3 Replies
 3 Subscribed to this topic
 30 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 19
New Around Here

DNN 9.11.2

Is there a setting (and if so, where is it) where you can set the default value of the "Replace Tokens" setting on HTML modules so it's alway selected when a new HTML module is added to a page?

Thanks

Veteran Member
Posts: 838
Veteran Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!

I'm afraid there is not. But I agree it would be a great addition!

Can you log an issue on https://github.com/dnnsof.../Dnn.Platform/issues

In the meantime (I did not test this, btw :-) ): ChatGPT provides the following SQL to manually update the database

UPDATE ModuleSettings SET SettingValue = 'True' WHERE SettingName = 'ReplaceTokens' AND ModuleID IN ( SELECT ModuleID FROM Modules WHERE ModuleDefID = ( SELECT ModuleDefID FROM ModuleDefinitions WHERE FriendlyName = 'HTML' ) );

 

New Around Here
Posts: 19
New Around Here

Thanks!

I've logged an enhancement request.

I also checked ChatGPT and got a similar answer.  It was actually very close, the only difference is SettingName = "HtmlText_ReplaceTokens".  Unfortunately this only fixes those instances where the setting was already in place at some time or another.  For any default HTML modules, there is no db entry so there is nothing to update.

Veteran Member
Posts: 1182
Veteran Member
MVP
MVP
You're an MVP!
Posted By jacton on 11/5/2024 11:00 PM

[...] For any default HTML modules, there is no db entry so there is nothing to update.

You can add the record to the ModuleSettings table, you need to know the ModuleIDs.

Happy DNNing!
Michael

 

 

 

Michael Tobisch
DNN★MVP

DNN Connect

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

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

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. 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.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved