The content type CMS_IMGEDITOR provides set one image, which can be displayed using CMS_IMG content type.The usage 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 modul module section and you are finished.
...
Code Block | ||
---|---|---|
| ||
echo "CMS_IMGEDITOR[1]"; or echo "CMS_IMGEDITOR[100]"; |
...
Configuration
The configuration of CMS_IMGEDITOR is splitted in split into three different sections.
To configure the image edtor 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 the a file there or remove allready an already selected file by selecting the first option. After selection of the file you can save selection Save the settings of all tabs by clicking on the green checkbox or cancel selection discard all changes by clicking on the red cross icon.
In the second tab Meta you can input different meta information like title, description, keywords, internal notes and copyright.
After input you can save selection by clicking on green checkbox or cancel selection by clicking on red cross icon.
In the last tab Upload you can create new directory in upload treedirectories, upload new files or select allready already existing files .The way how to select file ist in the same like way as in directory tab(see above)the Directories tab.
To upload the new file click on the browse button, select a file from your filesystem and uploaded file will be placed in selected directoryit 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.
| |||||
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. |