SemicolonAcademy / ci-cms

Automatically exported from code.google.com/p/ci-cms
Other
0 stars 0 forks source link

Themes Problem #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
During the pre-release, please update your files with the latest svn before
reporting a defect
-----

What steps will reproduce the problem?
1. Installing new theme
2. Using new theme
3.

What is the expected output? What do you see instead?
I expectd my new theme to be used in the CMS, but instead I see an error
saying "mytheme/index.php" not found.

What version of the product are you using? On what operating system?
I am using the version 0.90 on Ubuntu 9.10 and Windows XP

Please provide any additional information below.
I made a new folder inside the application/views/ and then made index.php,
header.php and footer.php in the folder along with other css, js and images
folder. I can see my theme name in the theme selection dropdown at the
backend. I can select it and save it. But while browsing the frontend I see
an error saying "mytheme/index.php" not found.

Original issue reported on code.google.com by rijal...@gmail.com on 24 Dec 2009 at 3:30

GoogleCodeExporter commented 9 years ago
This problem never came up. What's the name of the theme folder?

Original comment by heriniai...@gmail.com on 24 Dec 2009 at 7:51

GoogleCodeExporter commented 9 years ago
Hi, I have made many themes and they all work since version 0.2. Your theme 
files 
should be place in application/views/<mytheme> and that folder should include 
an 
index.php file containing either your basic page layout or a set of php 
includes to 
include various portions of your page layout. 

Eample:
file index.php

<?php
include "header.php";
include "content.php";
include "footer.php";
?>

A theme using the above file would need to have four php files located in the 
<mytheme> folder. First, the index.php file which combines the other three 
files 
together. Then the header.php, content.php and finally the footer.php file.

A simpler design would have a single index.php file with content similar to 
this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<!-- Include title from system -->
<title><?php echo $this->system->site_name?> | <?php if 
(!empty($title)):?><?php 
echo $title?><?php endif;?></title>

<!-- include meta data from system->page -->
<meta name="keywords" content="<?php if (!empty($meta_keywords)):?><?php echo 
$meta_keywords?> - <?php endif; ?><?php echo $this->system->meta_keywords;?>" />
<meta name="description" content="<?php if (!empty($meta_description)):?><?php 
echo 
$meta_description?> - <?php endif; ?><?php echo 
$this->system->meta_description;?
>" />

<meta name="robots" content="index,follow" />

<!-- include favicon from theme folder -->
<link rel="shortcut icon" href="<?php echo base_url()?>application/views/<?php 
echo 
$this->system->theme?>/images/favicon.ico" type="image/x-icon" />

<!-- Include JQuery Scripts if used -->
<script src="<?php echo base_url()?>application/views/<?php echo $this->system-
>theme?>/javascript/jquery.js" type="text/javascript"></script>

<!-- include any other javascripts needed from the 
application/views/<mytheme>/javascript folder -->

<!-- link css file from application/views/<mytheme>/style folder -->
<link rel="stylesheet" href="<?php echo base_url()?>application/views/<?php 
echo 
$this->system->theme?>/style/<mystyles>.css" type="text/css" media="screen" 
charset="utf-8" />

</head>

<body class="doc-body">
<div id="wrapper">
    <div id="site-title">
        <h1>My Theme</h1>
    </div>
    <div id="menu">
    </div>
    <div id="content" class="content">
        <?php $this->load->view('../modules/' . $module . '/views/' . 
$view); ?>
    </div>
    <div id="copyright" class="copyright">
    </div>
    <div id="gutter" class="gutter">
    </div>
</div>
</body>
</html>

Then to get the theme to show you must login to the admin panel and select it 
under 
the dashboards theme tab.
I am also attaching the sample index.php file for your review.

Original comment by rmorga...@gmail.com on 4 Jan 2010 at 10:47

Attachments: