Modified Story.content_macro() to return the infamous three periods if there is no other content available

This commit is contained in:
Tobi Schäfer 2008-05-12 10:51:32 +00:00
parent 1f4c87e4d1
commit 46dfdafbe2

View file

@ -64,16 +64,14 @@ Story.prototype.content_macro = function(param) {
if (!part && param.fallback) {
part = this.getRenderedContentPart(param.fallback, param.as);
}
if (part) {
if (param.limit) {
part = part.stripTags().head(param.limit,
param.clipping, param.delimiter);
}
if (param.as === "link") {
res.write(this.link_filter(part, param));
} else {
res.write(part);
}
if (part && param.limit) {
part = part.stripTags().head(param.limit,
param.clipping, param.delimiter);
}
if (param.as === "link") {
res.write(this.link_filter(part || "...", param));
} else {
res.write(part);
}
}
return;