I am updating a client site that uses Jetbox CMS v2.1.
I need to add <script>
and <link>
tags in the <head>
section, but cannot for the life of me find which file to edit. There are numerous tpl
files and the CMS seems rather confusing.
I tried editing index.php
with the following:
//I am pretty sure that this replaces {var_name} in the view
//with the second argument content
$t->set_var("var_name", "var_name content here");
I just can't find the correct file to insert {var_name}
in...
Thanks to anybody who can help!
P.S. The Jetbox CMS is opensource and has been abandoned, so I can't find any forums or support sites for it.
Edit
Well, perhaps somebody will actually read this... haha.
While the accepted solution probably is the normal solution, I co开发者_开发技巧uld not find the template file that works for sub-pages (which are called "Links Categories" for some strange reason).
I ended up "piggy-backing" the <script>
and <link>
tags onto a {baseurl}
variable, which is included in the <head>
section. Unfortunately, I was trying to implement Lightbox2, but it did not work because of some strange IE8 error that prevents Lightbox2 from working correctly when the <script>
tags come before <meta>
tags. Since I could not include the <script>
tags after the <meta>
tags because I couldn't find the correct template to edit, I just scrapped Lightbox2 for this project. It wasn't a required part of the project, just something extra I was trying to add.
Oh well.
Jetbox seems like a decent CMS for what it is/was, but the naming of sections is odd and un-intuitive.
Well I downloaded the cms for kicks and looking at it rapidely this file: main_tpl.html. Seems to be where you would want to inject this code. The structure of this cms seems pretty simple in that there is a php file with logic and html files with views. So when ever you set something like that in a php file look for ther corresponding html.
In this setup tpl = template.
Heres how I would do it in the default setup I have:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>{pagetitle}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
{baseurl}
<link rel="stylesheet" href="style.css" type="text/css">
{var_name}
So your variable right there and it should work. There is already one {baseurl} in there.
精彩评论