CMS_IMGEDITOR
The content type CMS_IMGEDITOR allows you to link to an image that was uploaded in the CONTENIDO backend.
Using it is quite simple, put the code below in your output module section and you are finished.
The name CMS_IMGEDITOR specifies which content type should be used and [1] is the index of headline. The index must be integer value.
Note
If you are using more then one CMS_IMGEDITOR per article, you have to change/increment index of the next CMS_IMGEDITOR.
echo "CMS_IMGEDITOR[1]"; or echo "CMS_IMGEDITOR[100]";
Configuration
The configuration of CMS_IMGEDITOR is split into three different sections.
To configure the image editor click on the blue image icon(see screenshot below).
In the first tab Directories you can select one directory. One the right side, you will see all files from the selected directory. You can choose a file there or remove an already selected file by selecting the first option. Save the settings of all tabs by clicking on the green checkbox or discard all changes by clicking the red cross.
In the second tab Meta you can input different meta information like title, description, keywords, internal notes and copyright.
In the last tab Upload you can create new directories, upload new files or select already existing files in the same way as in the Directories tab.
To upload the new file click on the browse button, select a file from your filesystem and it will be sent to the server and then appear in the current folder.
Methods for CMS_IMGEDITOR
List all methods for CMS_IMGEDITOR at our API documentation.
Function | Description |
---|---|
getAbsolutePath() | Get the absolute path to the image (e.g. "var/www/contenido/cms/uploads/images/image.jpg") |
getRelativePath() | Returns a path to the image relative to the upload directory of the client (e.g. "images/image.jpg") |
getAbsoluteUrl() | Return the absolute URL of the image (e.g. "http://example.com/cms/uploads/images/image.jpg") |
getRelativeUrl() | Get the URL of the image relative to the client base directory (e.g. "uploads/images/image.jpg") |
getMetadata() | Gives an array with configured meta data. $returnValue = array( "medianame" => "bla", "descirption" => "picture of a lake", "keywords" => "lake nice picture" "internalnotice" => "do not touch" "copyright" => "(C) 1295"); |
generateViewCode() | Generates the code which should be shown if this content type is shown in the frontend. |
generateEditCode() | Generates the code which should be shown if this content type is edited. |
generateFileSelect() | Generate a select box containing all files in the given directory. |
getImageMeta() | Gets the meta data of the image with the given filename/dirname (similar to getMetaData()). |
uplmkdir() | Creates an upload directory. Wrapper function for uplmkdir in functions.upl.php. |
uplupload() | Uploads the transmitted files saved in the $_FILES array. |