Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
New to CMS Builder and need a little help please

 

 


watersidedesign
New User

Jul 4, 2008, 1:37 AM

Post #1 of 3 (539 views)
Shortcut
New to CMS Builder and need a little help please Can't Post

Hi All,

This is my first time using CMSB and PHP for that matter so I wonder if you could offer a little assistance :)

I have used CMSB to create a php file that lists categories. When uploaded to the server this works fine. What I want to do is include this in different files so what I thought I could do was simply use include instead of copying the code into each page.

So for example:



<!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=utf-8" />
<title>Untitled Document</title>
<link href="/style.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="17%">&nbsp;</td>
<td width="83%">&nbsp;</td>
</tr>
<tr>
<td><?php include("/panels/maincat.php"); ?></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>




but all this does is shows a blank page where if i call /panels/maincat.php from the browser, i get my list of categories.



Any ideas?


Donna
Staff / Moderator


Jul 4, 2008, 11:04 AM

Post #2 of 3 (493 views)
Shortcut
Re: [watersidedesign] New to CMS Builder and need a little help please [In reply to] Can't Post

Hi there!

PHP actually requires the full server path if you're doing an include. So, /panels/maincat.php likely isn't the right path. It'll probably be something more like /home/username/httpdocs/panels/maincat.php -- check with your hosting provider, and they can tell you the full path to your document root. :)

Donna


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


Dave
Staff / Moderator


Jul 4, 2008, 11:34 AM

Post #3 of 3 (492 views)
Shortcut
Re: [watersidedesign] New to CMS Builder and need a little help please [In reply to] Can't Post

Or try a relative path that doesn't start with a slash, like this:

include("panels/maincat.php");

If it start with a slash you need the entire filepath.

Let me know if removing the first / fixed it or not.

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4