dongqi6964 2010-02-08 22:32
浏览 47
已采纳

ExpressionEngine是否有办法在Django的{{MEDIA_URL}}模板中引用静态媒体文件夹?

It would be nice to be able to refer to a set "static" folder as a variable instead of having to keep track of a specific URL that might need to be changed if static media gets moved to a CDN later on.

For example, this:

<script src="{static_media}/js/jquery-1.4.min.js"></script>

Instead of this:

<script src="/static/js/jquery-1.4.min.js"></script>
  • 写回答

1条回答 默认 最新

  • dongweihuan8832 2010-02-08 22:50
    关注

    You can just go into the "Template" section of the backend to create a global variable for any other strings you'd like to create a global variable for.

    See here: http://expressionengine.com/docs/templates/globals/user_defined.html

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度