Reply to topic
include
jbjaaz


Joined: 17 Jan 2006
Posts: 1
Reply with quote
Hi,

Is there a way to use php includes in a template?

Example. We are building a site. It has two main pieces, the store (using miva) and the content part (using mambo). Now, the main nav bar is created dynamically via a database and is an include file.

mambo template
Code:
<html>
<head><title>....</title></head>
<body>
  <?php include(header.php); ?>
  <?php include(nav.php); ?>
  <div id="content"></div>
  <?php include(footer.php); ?>
</body>
</html>


So, for the header and footer it was a simple matter of just cutting and pasting the code into miva, but how about the nav? The nav uses all this php code to pull from a db and output the nav bar. There's gotta be some way to include the file in MIVA? Thanks in advance.

Oh, we are using Miva 4.
include statement
rickvidallon


Joined: 15 Nov 2004
Posts: 26
Location: Virginia Beach,VA
Reply with quote
In my site www.cardiocoach.com I created a new CSS drive nav with a php includes:
<head>
<link rel="stylesheet" type="text/css" media="screen" href="shared/menu.css" />
<body>
<div id="globalWrapper">
<div id="header">
<img src="https://www.cardiocoach.com/products/NEWCART_WHOLEheader.jpg" width="730" height="135" alt="Cardio Coach&trade; - Guided Workout Series" />
<img src="https://www.cardiocoach.com/products/NEWCART_HEADER.jpg" alt="Cardio Coach&trade; - Guided Workout Series" width="499" height="157" id="person" />
<? include('inc_menu.php'); ?>
</div>

Any suggestion how to code this in the Miva/OpenUI global header?
Bruce


Joined: 04 May 2005
Posts: 23
Reply with quote
See posts in the thread "Can you use include files in Merchant 5"
Re: include
jmh


Joined: 18 Jun 2005
Posts: 50
Location: Dallas, TX
Reply with quote
jbjaaz wrote:
Hi,

Is there a way to use php includes in a template?

Example. We are building a site. It has two main pieces, the store (using miva) and the content part (using mambo). Now, the main nav bar is created dynamically via a database and is an include file.

mambo template
Code:
<html>
<head><title>....</title></head>
<body>
  <?php include(header.php); ?>
  <?php include(nav.php); ?>
  <div id="content"></div>
  <?php include(footer.php); ?>
</body>
</html>


So, for the header and footer it was a simple matter of just cutting and pasting the code into miva, but how about the nav? The nav uses all this php code to pull from a db and output the nav bar. There's gotta be some way to include the file in MIVA? Thanks in advance.

Oh, we are using Miva 4.

If you have OpenUI, you can use a token to include files within your mivadata directory. (sometimes known as htsdata)

Jason
include
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic