Problems, need help? Have a tip or advice? Post it here.
7 posts Page 1 of 1
Hi

I have a page Index.php its work fine under root, but if I place it in side folder like

Member/index.php then its work but all snippest *.html file(s) not working.

I mean header.html, menu.html, footer.html are not working.

Kindly help me.


Thanks in advance.
Can you please post in the relevant code, Subhamoy?
Will have to take a look at it to know what the problem could be.

Thanks
Hi,
KK

code for Root index.php
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<html lang="en">
<head>
<cms:embed 'header.html' />
</head>
<body>
<header id="header" class="fixed">
<!-- header-content -->
<div id="content-header">
  <!-- logo -->
  <div id="logo"> <a href="#top-page" title="ATM" ><img src="assets/logo.png" title="ATM" alt="ATM" /></a> </div>
  <!-- /logo -->
  <!-- main-menu -->
  <nav id="main-menu">
  <cms:embed 'menu.html' /> 
  </nav> 
  <!-- /main-menu -->
</div>
<!-- /float-header -->


</header>

<div id="footer">
<cms:embed 'footer.html' />
</div>

</body>
</html>
<?php COUCH::invoke(); ?>


This code is running fine...
But when I place it inside root member/index.php then
<cms:embed 'header.html' /> , <cms:embed 'menu.html' /> & <cms:embed 'footer.html' /> is not working.

What to do Sir?
Thanks.
Nothing seems wrong with the code.

You stated -
<cms:embed 'header.html' /> , <cms:embed 'menu.html' /> & <cms:embed 'footer.html' /> is not working.
Can you please let us know what you see when they don't work? Do you get some error message or is it something else?

Please also post here one of the embedded snippets.

Thanks.
Hi KK

In snippest header.html
Code: Select all
<title>ATM</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index,follow" />
<meta name="keywords" content="Mobile, Accessories," />
<meta name="description" content="ATM" />
<meta name="author" content="Digital Icon" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="js/prettyPhoto/css/prettyPhoto.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="style.css" media="screen"/>
<script type="text/javascript" src="js/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/custom.js"></script>
<script type="text/javascript" src="js/jquery.easing-1.3.js"></script>
<script type="text/javascript" src="js/jquery.R-Slider.js"></script>
<script type="text/javascript" src="js/jquery.R-Forms.js"></script>
<script type="text/javascript" src="js/jquery.R-Menu.js"></script>
<script type="text/javascript" src="js/jquery.tipsy.js"></script>
<script type="text/javascript" src="js/jquery.masonry.min.js"></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/jquery.googlemaps1.01.js"></script>
<script type="text/javascript" src="js/prettyPhoto/js/jquery.prettyPhoto.js"></script>
<script type="text/javascript" src="fonts/PTSansNarrow_5F400.js"></script>


No css and js file(s) are not working

In snippest menu.html
Code: Select all
<ul id="menu">
    <li><a href="index.php">Home</a></li>
    <li><a href="portfolio.php">Portfolio</a></li>
    <li><a href="services.php">Services</a></li>
    <li><a href="news.php">News</a></li>
    <li><a href="about.php">About</a></li>
    <li><a href="contact.php">Contact</a></li>
    <li><div align=right style="padding: 25px;"><cms:search_form msg='Search' processor="<cms:show k_site_link/>search.php" /> </div>
    </li>
  </ul>
 

All menu will appear ugly without css and js, and if I click on a menu like News(news.php)
it will search here http://localhost/cms1/members/news.php

cms1 is my root folder all .php files are there
I want to run news.php from folder members so I move this news.php inside members folder.
Subhamoy, that is an issue with the paths you are using in the snippets e.g.
<link rel="stylesheet" type="text/css" href="style.css" media="screen"/>
<script type="text/javascript" src="js/jquery/jquery-1.4.4.min.js"></script>
-the paths above are relative to the root so they work when the template is in root.

Once you move the template to a subfolder, the paths will break.

To rectify this, make all CSS/JS paths absolute by either -
1. prepending them with a slash '/' e.g.
<link rel="stylesheet" type="text/css" href="/style.css" media="screen"/>
<script type="text/javascript" src="/js/jquery/jquery-1.4.4.min.js"></script>

2. or explicitly adding a full path as follows
<link rel="stylesheet" type="text/css" href="<cms:show k_site_link />style.css" media="screen"/>
<script type="text/javascript" src="<cms:show k_site_link />js/jquery/jquery-1.4.4.min.js"></script>

Hope this helps
Respected / Dear, KK

Thank you very much for your help. Now I am able to work on subfolder.

Thank you again and again

Subhamoy
7 posts Page 1 of 1