<$ var image = project.getImage(article.value("image")); var contentImageWidth = "#val(contentcopy-max-image-width)"; var defaultImageWidth = 960; var cssClass = article.cssClass || ""; var isBreakout = cssClass.indexOf("zpBreakout") !== -1 ? true : false; // Kann auch "700px" sein, deshalb mit parseInt nur die Zahl holen und trimmen - falls leer, auf default 960 setzen. contentImageWidth = parseInt(contentImageWidth) || defaultImageWidth; var gridCols = article.column.cssClass; if ( gridCols ){ gridCols = parseInt((gridCols.match(/\bc[1-9][0-2]?\b\s?/) || 12).toString().replace("c", "")); } else{ gridCols = 12; } var columnMargin = 30; var columnWidth = ((contentImageWidth + columnMargin) / 12) * gridCols; // minimum width needed for 100% width display on 1-column breakpoint var minwidth = parseInt(479 - columnMargin); var contentCopyWidth = parseInt(columnWidth - columnMargin) || defaultImageWidth; if ( minwidth > contentCopyWidth ){ contentCopyWidth = minwidth; } //system.log("contentCopyWidth: " + contentCopyWidth + " - image: " + image.name + "( Page " + article.page.name +")"); var imageError = false; if ( !isNull(image) ) { if ( isBreakout ){ contentCopyWidth = image.workingCopyWidth; } try { var iresult = image.ensureContentCopy(article, contentCopyWidth); var thumbImageWidth = image.contentCopyWidth; var thumbImageHeight = image.contentCopyHeight; var description = image.description; var altText = system.htmlEncode(system.removeHtmlTags(image.altText)); var oldAltText = system.htmlEncode(system.removeHtmlTags(article.valueExpanded("alt", ""))); if ( altText == "" && oldAltText !== "" ){ altText = oldAltText; } var encodedDescription = system.htmlEncode(image.description); var stripDescription = system.htmlEncode(system.removeHtmlTags(image.description)); // strip

-Tags from description as

is not valid inside SPAN description = description.toString().replace(/

/g,""); description = description.toString().replace(/<\/p>/g,"
"); //system.log(" Image Width: " + contentCopyWidth +" / Returned contentCopyWidth:" + thumbImageWidth + " / Image Result: " + iresult); } catch(err) { imageError = true; } } if ( stripDescription !== "" ) { var showCaption = "1"; } else { var showCaption = "0"; } var lightBox = article.value("lightbox", "lightbox"); var clickURL = article.value("clickurl"); var effect = article.value("effect", "none"); var effectClass = ""; switch ( effect ) { case "hoverzoom": effectClass = " zpeffect zphoverscale"; break; default: effectClass = ""; } $> <$ if ( isNull(image) || imageError ) { $> <$ if ( system.preview ) { $>

Das gewählte Bild ist anscheinend gelöscht worden. Bearbeiten Sie diesen Artikel und wählen Sie erneut ein Bild aus.

<$ } $> <$ } else { $> <$ if ( lightBox == "zoom" ) { $> <$= system.partial("article-begin.html", "popupimage zproundimage") $>
<$ if ( image.isSvgImage ){ $> <$= altText $> <$ } else if ( image.isAnimatedGif ) { $> <$= altText $> <$ } else { $> <$= altText $> <$ } $>
<$ if ( showCaption == "1" && description ) { $> <$= description $> <$ } $>
<$= system.partial("article-end.html") $> <$ } else if ( lightBox == true || lightBox == "lightbox" ) { $> <$= system.partial("article-begin.html", "popupimage zproundimage") $>
<$ if ( image.isSvgImage ){ $> <$= altText $> <$ } else if ( image.isAnimatedGif ) { $> <$= altText $> <$ } else { $> <$= altText $> <$ } $> Bild in Lightbox öffnen (open image in lightbox). <$ if ( showCaption == "1" && description ) { $> <$= description $> <$ } $>
<$= system.partial("article-end.html") $> <$ } else if ( lightBox == "off" ) { $> <$= system.partial("article-begin.html", "zproundimage") $> <$ if ( image.isSvgImage ){ $> <$= altText $> <$ } else if ( image.isAnimatedGif ) { $> <$= altText $> <$ } else { $> <$= altText $> <$ } $> <$ if ( showCaption == "1" && description ) { $> <$= description $> <$ } $> <$= system.partial("article-end.html") $> <$ } else { $> <$= system.partial("article-begin.html", "zproundimage") $> <$ if ( clickURL !== "" ) { $> <$ if ( image.isSvgImage ){ $> style="display: block;"<$}$>> <$ if ( image.isSvgImage ){ $> <$= altText $> <$ } else if ( image.isAnimatedGif ) { $> <$= altText $> <$ } else { $> <$= altText $> <$ } $> Gehe zu URL (go to url). <$ } else { $> <$= altText $> <$ } $> <$ if ( showCaption == "1" && description ) { $> <$= description $> <$ } $> <$= system.partial("article-end.html") $> <$ } $> <$ } $>