Here’s a really cool trick that I use for clients all the time. In the webtop, when editing the body of an HTML page, below the main tinyMCE editor text area are 2 select boxes for images and files.
The default action for inserting an image is to insert the thumbnail with a link to the full-sized image. But, what if you don’t want that? What if you just want the thumbnail and nothing else?
Inside your /project_folder/webskins/dmImage folder, create a file called InsertHTML_thumbnail.cfm. Call it whatever you want, just make sure InsertHTML_ is at the beginning of it.
Inside that file, please the following code:
<!--- @@displayname: Thumbnail only --->
<!--- @@author: Jake Churchill --->
<cfoutput>
<img src="#application.url.webroot#/images/#stObj.thumbnail#" alt="">
</cfoutput>
Now, go back to the webtop and edit the body again. Under the images select box you now have a dropdown. The dropdown displays all of the HTML snippets that are available. The name displayed is what you put in @@displayname: in the file.
Now, what if you want a text link to say a PDF file?
Put the following code in /project_folder/webskins/dmFile:
<!--- @@displayname: Link to PDF --->
<!--- @@author: Jake Churchill --->
<cfoutput>
<a href="/files/#stObj.filename#" target="_blank">#stObj.label#</a>
</cfoutput>
This will give you a text link with the label of the PDF file (label as entered into the file library). The link will open a new window and display the PDF file, assuming the correct plugin is available on the client machine.

Related Articles
No user responded in this post
Leave A Reply