jcoppieters / cody

Javascript Content Management System running on Node.js
howest.cody-cms.org
MIT License
678 stars 197 forks source link

the problem of footer html render #11

Closed qianfoling closed 10 years ago

qianfoling commented 10 years ago

I am learning to use cody cms. In the management interface, footer.first use the default settings. as shown in Figure default

visit the website, the render page footer display: default

Is this correct? Why not a hyperlink

jcoppieters commented 10 years ago

Now you can do whatever you want with this footer.first variable. It doesn't have to be a link, mailto, ... you can even put an img tag (with or without a link on it)

qianfoling commented 10 years ago

Thanks. I use Cody version 3.2.2. I have made a few changes in the footer.ejs, as below: Original <% if (first && (typeof first !== "undefined")) { %> <%= first.render() %> <% } %> Modyfied <% if (first && (typeof first !== "undefined")) { %> <%- first.render() %>

<% } %>

Escapes html by default with <%= code %> Unescaped buffering with <%- code %>