Install and use theme in existing sites within submaps

Permalink
Hi,

I hope you can help me with the following problems:

1) Installation/setting up

I have made a static website containing 3 static sub-websites.

mydomain.com
- mydomain.com/website1
- mydomain.com/website2
- mydomain.com/website3

On one of the sub-websites I want to use Concrete 5 for editing the front page content (of the sub-map). I already made a template for Concrete 5.

My question is how I can make this work. Do i have to install C5 in a sub-map or in the root?

---

2) Theme code

I got some errors while trying to install it in different ways and installing C5/ testing it the main website.

When I installed my theme some images/css/js could not be found. (Also the C5 admin/edit/addpage bar was not visible) I did the following:

CSS/JS:
<?php
   Loader::element('header_required');
?>
<link rel="stylesheet" type="text/css" media="all" href="<?=$this->getStyleSheet('css/all.css')?>" />
<link rel="stylesheet" type="text/css" media="all" href="<?=$this->getStyleSheet('http://fonts.googleapis.com/css?family=NAME')?>" />
<link rel="apple-touch-icon-precomposed" href="<?=$this->getThemePath()?>/images/icons/iphone-icon.png" />
<script type="text/javascript" src="<?=$this->getThemePath()?>/js/JAVASCRIPT.js"></script>
<!--[if lt IE 7]>
        <script type="text/javascript" src="<?=$this->getThemePath()?>/js/unitpngfix.js"></script>
<![endif]-->
</head>


Using images in my theme
<img src="<?php echo $themePath ?>/images/image.png">


I hope someone can help me, point me in the right direction or make a good other suggestion.

Thank you

 
mkly replied on at Permalink Best Answer Reply
mkly
On #2:
<?php
   Loader::element('header_required');
?>
<link rel="stylesheet" type="text/css" media="all" href="<?=$this->getStyleSheet('css/all.css')?>" />
<link rel="stylesheet" type="text/css" media="all" href="<?=$this->getStyleSheet('http://fonts.googleapis.com/css?family=NAME')?>" />
<link rel="apple-touch-icon-precomposed" href="<?=$this->getThemePath()?>/images/icons/iphone-icon.png" />
<script type="text/javascript" src="<?=$this->getThemePath()?>/js/JAVASCRIPT.js"></script>
<!--[if lt IE 7]>
        <script type="text/javascript" src="<?=$this->getThemePath()?>/js/unitpngfix.js"></script>
<![endif]-->
</head>

I would instead do
<link rel="stylesheet" type="text/css" media="all" href="http://fonts.googleapis.com/css?family=NAME" />
<link rel="stylesheet" type="text/css" media="all" href="<?=$this->getThemePath()?>/css/all.css" />
<link rel="apple-touch-icon-precomposed" href="<?=$this->getThemePath()?>/images/icons/iphone-icon.png" />
<script type="text/javascript" src="<?=$this->getThemePath()?>/js/JAVASCRIPT.js"></script>
<!--[if lt IE 7]>
        <script type="text/javascript" src="<?=$this->getThemePath()?>/js/unitpngfix.js"></script>
<![endif]-->
<?php Loader::element('header_required'); ?>


Note that Loader::element('header_required') is at the bottom and some other changes.

On #1:
There is a file named config/site.php
There are two main things you want to notice. I've added some examples as to what you might want to change them to.
define('BASE_URL', 'http://www.example.com/website1');

and
define('DIR_REL', '/rootsubdirectory');

Maybe these things will point you in the right direction? Let me know if you have more questions.