You need to sign in to do that
Don't have an account?
Conditionally link to assets
Hi,
If the parent page element is selected then the Scripts and Style Sheets menus appear in the Properties tab on the right. In the Script menu we can add scripts to both <head> and <body>. Additionally, we can configure the content of <head>. This is how I am including some <meta> content and a <!--[if IE]> statement. My question is how do I conditionally link to assets?
For example, below is the code from our original site with the original relative paths. How do I link to selectivizr-min.js without hosting the file myself? This file is already imported, I just need to know the location of it in Siteforce so I can link to it.
<!--[if IE]> <script type="text/javascript" src="media/js/jquery-1.6.2.min.js"></script> <script type="text/javascript" src="media/js/selectivizr-min.js"></script> <script type="text/javascript" src="media/js/jquery.placeholder.js"></script> <script>$(document).ready(function() { $(document).placeholder(); });</script> <link type="text/css" rel="stylesheet" href="media/css/ie.css" /> <![endif]--> <!--[if lte IE 6]> <link type="text/css" rel="stylesheet" href="media/css/ie6.css" /> <![endif]-->
Thanks in advance,
Anthony
Hi Anthony,
As far as I know, you can add all js and css files as Assets but you can't create folders. In other words, you can't have a tree structure for Assets.
Try to link the files directly to the "root" folder:
Bear in mind the current css files issues in Siteforce:
http://boards.developerforce.com/t5/Siteforce/Siteforce-doesn-t-support-the-CSS-property-quot-content-quot/td-p/339583
Kind regards,
Juanlu.