Page 1 of 1

Importing a Template containing javascript (big business 2)

Posted: Wed Jul 25, 2012 6:28 pm
by slu
Hello out there,
I am a beginner and trying to import a template
called big business 2.
http://www.freecsstemplates.org/preview/bigbusiness2/

Everything works fine but I think the problem is that I may
not have the right pathes for images and .js code cause
the page looks really worse and did not contain pictures.
I already looked up and tried to work with {literal} but it doesnt work.
This is the beginning of the template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 3.0 License

Name : Big Business 2.0
Description: A two-column, fixed-width design with a bright color scheme.
Version : 1.0
Released : 20120624
-->
<__html xmlns="http://www.w3.org/1999/xhtml">
<head>
{metadata}
<title>{title}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
{cms_stylesheet}
{literal}
<__script__ type="text/javascript" src="[[root_url]]/uploads/BigBusiness2/jquery-1.7.1.min.js"></__script>
<__script__ type="text/javascript" src="[[root_url]]/uploads/BigBusiness2/jquery.dropotron-1.0.js"></__script>
<__script__ type="text/javascript" src="jquery.slidertron-1.1.js"></__script>
<__script__ type="text/javascript">
{/literal}
$(function() {
$('#menu > ul').dropotron({
mode: 'fade',
globalOffsetY: 11,
offsetY: -15
});
$('#slider').slidertron({
viewerSelector: '.viewer',
indicatorSelector: '.indicator span',
reelSelector: '.reel',
slidesSelector: '.slide',
speed: 'slow',
advanceDelay: 4000
});
});

</__script>
</head>



I got errors showing the page and I cant see any pictures,
they are included here in the page.

<div id="slider">
<div class="viewer">
<div class="reel">
<div class="slide">
<img src="[[root_url]]/uploads/BigBusiness2/slide01.jpg" alt="" />
</div>
<div class="slide">
<img src="[[root_url]]/uploads/BigBusiness2/slide02.jpg" alt="" />
</div>
<div class="slide">
<img src="[[root_url]]/uploads/BigBusiness2/slide03.jpg" alt="" />
</div>
<div class="slide">
<img src="[[root_url]]/uploads/BigBusiness2/slide04.jpg" alt="" />
</div>
<div class="slide">
<img src="[[root_url]]/uploads/BigBusiness2/slide05.jpg" alt="" />
</div>
</div>
</div>

So can anyone tell me If I maybe wrong with the pathes ?
What is correct relativ pathname in cmsms ?
I have a directory /CMSMS and assume that when I put my Images in /CMSMS/uploads//BigBusiness2/
the system might find them when specified as

[[root_url]]/uploads/BigBusiness2/slide05.jpg

Maybe its also a problem with javasript, cause if I try the same thing local and comment out the corresponding .js files I get the same worse results as with cmsms.


Best regards

slu

Re: Importing a Template containing javascript (big business

Posted: Wed Jul 25, 2012 8:18 pm
by Dr.CSS
Since you have the {metadata} in the <head> you don't need the [[root_url]] especially in the template as that is the code for the style sheets and doesn't work in the template, should just be...

src="uploads/Bi**********
or
src="/uploads/Bi**********