Introduction
App creators can now easily incorporate images or GIFs into your Cogniss mobile and web apps using CML. This syntax allows creators to reference the image or GIF file ID and embed it into various locations such as the home/dashboard, feedback pages, notifications, or anywhere within Activities.
Simply copy and paste the CML syntax:
{{file "fileID"}}
❓What is CML (Cogniss Markup Language)?
How to use Image CML?
In Cogniss Creator, navigate to Media Library, select your desired media, and copy the file ID. Paste it within CML syntax {file "fileID"} in your app's content.
In Creator, click any ‘upload media’ button to open the Media Library
From the media library, select the image that you want to reference in your CML
While the image is selected, look for the 'File ID', which is typically displayed in the right-hand section, and copy the ‘File Id’ by clicking on it
Insert the CML syntax {{file "fileID"}} with your file ID where you want to add the image
It would look something like this: {{file "6189c1fa567ef5256d3bc622"}}
Save changes and check the results from your mobile/web app!
FAQ
Can I insert an image to the feedback page?
→ Yes, you can insert an image to the feedback using image CML
The CML syntax doesn't seem to show the image
→ If the CML syntax isn't displaying the image as expected, please ensure that you are copying the code exactly as provided: {{file "fileID"}}
Note that the quotation marks used here ("") are special characters specifically for coding and may appear differently from regular quotation marks. Double-check that you have copied the syntax correctly to ensure proper functionality.
Can I make a conditional content block with an image?
→ Yes, by using conditional CML along with image CML you can make conditional content block to personalise content. Cogniss has many way to present tailored content.
Please contact Cogniss team for further exploration.
Example: if a user scored less than 2 on ActivityA, show the image and text ‘The result is 0-2’
[condition]
{{activityResponseScore "ActivityA id"}}#<=#2
[result]
{{file “imageA id”}} The result is 0-2
[/result]
[/condition]