Modified Story.content_macro() to return the infamous three periods if there is no other content available
This commit is contained in:
parent
1f4c87e4d1
commit
46dfdafbe2
1 changed files with 8 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue