Benutzer-Werkzeuge

Webseiten-Werkzeuge


en:webedition:beginners-guide:images

Dies ist eine alte Version des Dokuments!


A PCRE internal error occured. This might be caused by a faulty plugin

===== Images ===== Your editors can always insert images in a WYSIWYG-textarea: <code><we:textarea name="content" wysiwyg="true" /></code> But this leads to "homegrown" layout and can look ugly quickly, so better give them image fields in the template: //An article with an optional image above, as seen by the editor:// <code> <we:ifEditmode> <we:img name="image" thumbnail="Article header"/> <we:textarea wysiwyg="true" name="content" /> </we:ifEditmode> </code> The above is the editor's view. They can choose an image, which is automatically resized to the size of the thumbnail with the name "Article header". //Frontend code:// <code> <we:ifNotEditmode> <we:ifNotEmpty name="image" type="image"> <div class="image"> <we:img name="image" thumbnail="Article header"/> </div> </we:ifNotEmpty> <div class="text"> <we:textarea wysiwyg="true" name="content"/> </div> </we:ifNotEditmode> </code> ==== Thumbnails ==== Often, editors just upload any image material straight from the camera. These images are way too large to display them on a website. webEdition lets You define thumbnail formats in various sizes (and filters) for use in various areas on the website: Lists, articles, galleries, etc. The module is in "Settings -> Thumbnails": Create a new thumbnail with the name "Icon" and give it the width of 240 (pixels). This thumbnail can be used in a listview like so: <code> <we:listview type="document"> <we:repeat> <we:ifFieldNotEmpty name="image" type="img"> <we:field type="img" name="image" thumbnail="Icon"/> </we:ifFieldNotEmpty> </we:repeat> </we:listview> </code> => The resized image is displayed. In the document itself, You'd use a larger thumbnail: <code><we:img name="image" thumbnail="Article header"/></code> (You have to define a thumbnail "Article header", of course.)

en/webedition/beginners-guide/images.1549640957.txt.bz2 · Zuletzt geändert: 2019/02/08 16:49 von Rudolf Horbas

Recent changes RSS feed