1

I want to add a Comodo Trust Logo to a Craft CMS website page per the instructions below:

Install Code Snippets

Please insert the following two snippets of HTML code into your webpage document. You will need to repeat the process for each web page you wish to display the TrustLogo.

<script type="text/javascript">//<![CDATA[
var tlJsHost = ((window.location.protocol == "https:") ? "https://secure.comodo.com/" : "http://www.trustlogo.com/");
document.write(unescape("%3Cscript src='" + tlJsHost + "trustlogo/javascript/trustlogo.js' type='text/javascript'%3E%3C/script%3E"));
//]]>
</script>

How do I access the Craft CMS code in order to add the above JS?

Thank you!

3

To edit the HTML code for your Craft site you're going to want to edit the appropriate template file in your Craft install. If you're running on Craft 2 your template files can be found in .craft/templates/; if you're on Craft 3 your templates are found in ./templates/.

You'll need to look in the Craft control panel and see which twig template the section containing the entry (or page) you're trying to edit references. You'll find that info if you try to edit the respective section in Settings > Sections.

I will mention as well, if you're looking to include some code that belongs in the HEAD of the html, you'll probably find that in a "master" twig template that contains the <head></head>. Once you find the twig template specified in the section settings in the Craft control panel, most of the time you'll see an {% extends %} tag which links back to that "base" template.

Hopefully that helps! I'd recommend maybe reading through the Craft docs, starting with Templating Overview. Cheers!

| improve this answer | |
  • Thank you Jalen! Unfortunately, I will have to find a Craft consultant -- when I sign into the site, I only see my dashboard with entries, assets, etc - no templates. I appreciate your help. – user8055 Feb 26 '18 at 22:13
  • Thank you again! I checked the section and can see the page I want to change; however, there is no code, just boxes. I am afraid this is something I shouldn't touch -- last thing I want to do is mess up the website :-) I will try to find a Craft consultant. Thanks! – user8055 Feb 26 '18 at 22:37
  • @user8055 yeah no worries! I'd be happy to help you with the project if you're interested; just ping me at contact[at]dominion-designs.com and we can discuss... – Jalen Davenport Feb 26 '18 at 22:44
2

Find the appropriate template in your craft/templates folder, and add it there.

If you want it to appear on every page, you'll likely put it in a _layout or shared footer template.

| improve this answer | |
  • Thank you Lindsey! Unfortunately, I will have to find a Craft consultant -- when I sign into the site, I only see my dashboard with entries, assets, etc - no templates. I appreciate your help. – user8055 Feb 26 '18 at 22:13
  • The templates are physical files. You'll need to FTP into the site (or access the files in another way). It's not accessible directly via the Control Panel. – Lindsey D Feb 26 '18 at 22:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.