MX

Table Of Contents
Replace with graphic file
Select this option if you want to insert a graphic or image into your website in place of the placeholder
object (eg. a PNG, GIF or other web compatible image file). Use the Browse button to select the file.
The chosen file is automatically copied to the support folder for the current design, so that when you
export your website the file will be included in the _htm_files folder along with all the generated images
for your site. See the Document Handling chapter for information about support folders.
Replace with HTML code
With this option you can paste HTML code which you've obtained from somewhere else into the head
and/or body sections of your page; i.e., between the <body></body> tags or <head></head> tags. For
example many sites provide widgets that you can add to your page by pasting the HTML in here. Follow
the instructions given by the provider. In most cases you need to add body code only, but some widgets
also require you to include some code in the head, which is why the head code option is also provided.
As mentioned above, you can just paste the HTML code directly onto your page instead of inserting it in
this dialog (while in the Selector Tool
). And using that approach automatically gives you a placeholder image that looks just like the actual
widget, so it's the recommended way to insert widget HTML code.
Warning
: You need to be careful to insert only code which you know is safe and from a trustworthy source.
Invalid or broken code will affect your published web page because Web Designer MX Premium simply
inserts the code as you provide it, unmodified and unchecked, into your page when it is exported.
If the HTML code that you enter references external files which are expected to be found in your
website, then you need to copy those external files into the support folder for your design. See the
Document Handling
chapter for information about support folders. Once in the support folder, the files will be automatically
copied to the _htm_files folder of your website when you export. Therefore you also need to make sure
that any references to these files in the HTML code references them at the right location.
Let's take a simple example to make this clearer. Suppose I want to insert a small piece of HTML code
which adds an image to my website. The HTML code I add will need to reference the image file
somewhere. First I copy the image file, say "myLogo.gif", into the support folder of my document. If the
document is "mySite.web", the support folder will be "mySite_web_files". I know that when I export this
website, I will export it to the name "mysite.htm". This means that all the generated images for my site,
and a copy of "myLogo.gif" which I put in the support folder, will be exported to the folder
"mysite_htm_files". Therefore I must make the HTML code I'm inserting reference the image file in that
location. So I may insert:-
<img src="mysite_htm_files/myLogo.gif" />
Note that this references the image file in the exported image folder location (_htm_files), NOT directly in
the support folder (_web_files), because only the exported image folder gets copied to the web server
along with my web page when the site is published.
Of course if I really only wanted to put an image on my website, it's much easier to just import the image
into Web Designer MX Premium directly! But this is a simple example that shows how to add HTML
code which references an external file.
Check Embedding YouTube, Flash And Other Widgets
for more examples!
Adding code to page head
Some code needs to be inserted into the head (<head> tag) section of the exported HTML code,
instead of to the body (<body> tag) section as it is by default.
To do this, click the HTML code (head) button in the Placeholder, Website or Page tab of the Web
Page 808