You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

修改DNN EasyNews模块中Span标签内的文本内容

How to Update the Span Text in DNN's EasyNews Module

Great question! Changing that "More links" text to "Download Document" can be done a few ways, depending on your access and how you want to maintain the change long-term. Here are the most reliable methods:

1. Check for Built-in Module Settings First

Start with the easiest approach: see if the EasyNews module lets you customize this text through its admin settings.

  • Go to the page where the module is placed, click the module's settings menu (gear icon), and look for sections like Localization, Display Options, or Text Labels. Some modules let you override default text strings directly here without touching code. If you find the "More links" entry, just update it to "Download Document" and save.

2. Override the Module Template (Best Practice for Customization)

If there's no setting for this, you'll want to edit the module's template file—but do it using an override so future module updates don't wipe your changes. Here's how:

  • Navigate to your DNN site's file system, go to /DesktopModules/EasyNews/ and find the template file that contains the <h2><span>More links</span></h2> code. It's likely named something like ArticleLinks.ascx (you can search the directory for the "More links" string to be sure).
  • Copy this file to your skin's custom module templates folder. Create a subfolder if it doesn't exist: /Portals/_default/Skins/[YourSkinName]/EasyNews/ (replace [YourSkinName] with the name of your active skin).
  • Open the copied template file in a text editor, find the line:
    <h2><span>More links</span></h2>
    
    Replace it with:
    <h2><span>Download Document</span></h2>
    
  • Save the file, then clear DNN's cache (go to Host > Host Settings > Performance > Clear Cache) to see the changes take effect.

3. Quick Client-Side Fix (JavaScript)

If you don't have access to the file system or need a temporary fix, you can use JavaScript to update the text on page load. Add this script to your skin's footer or the page's HTML content:

document.addEventListener('DOMContentLoaded', function() {
    // Target the specific span element using its parent classes
    const targetSpan = document.querySelector('.edn_aditionalBox.edn_articleLinks h2 span');
    if (targetSpan) {
        targetSpan.textContent = 'Download Document';
    }
});

Just note that this is a client-side change—users might see the original "More links" text briefly before it's replaced, so it's not ideal for production if you can use the template override method instead.

内容的提问来源于stack exchange,提问作者JC1990

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 06:59:10