Is it possible to use the same custom field multiple times in a template? I had thought to use a custom field to help define page specific styles, as well as return the page selected for the JS powered menu (so menu displays 'down button' for current page). The custom field works properly in the first application but then *nothing* returns for subsequent applications on the same page. I've turned debugging on, cookies are enabled.
Code for capital.php is as follows
Code for the capital.inc.php file is as follows
The function 'firstNav' in the main template returns the custom field 'pageon' correctly. In the .inc.php file it is as if the content is not being returned at all and the file not being processed... I do not see the added HTML content. Is there a cacheing functionality that I need to disable or clear?
This is the customfields plugin not the special pages although I may switch (will I need to re-do anything?).
Thanks!
Diana
If you want to see the issue live, sitemail me. I don't want to have the client ever find this thread. ;-)
Code for capital.php is as follows
Code:
<?php if(!defined('IN_GS')){ die('you cannot load this page directly.'); } ?>
<!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><?php get_page_title();?></title>
<?php get_header(); ?>
<link href="<?php get_theme_url(); ?>/styles.css" rel="stylesheet" type="text/css" />
<link href="<?php get_theme_url(); ?>/styles.css" rel="stylesheet" type="text/css" />
<!-- include jQuery and imagineMenu plugin -->
<script type="text/javascript" src="<?php get_theme_url();?>/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="<?php get_theme_url();?>/js/jquery.imagineMenu-1.1.js"></script>
<script type="text/javascript" charset="utf-8">
$(function () {
$('#firstNav').imagineMenu({image: '<?php get_theme_url();?>/img/menu.gif', link_widths: [64, 85, 81, 165, 146, 124, 115], selected:'<?php get_custom_field('pageon');?>'});
});
</script>
</head>
<body>
<div id="container">
<?php
include('top-menu.inc.php');
include('logo-bar.inc.php');
include('capital-main.inc.php');
include('bottom-menu.inc.php');
get_footer(); ?>
</body>
</html>
Code for the capital.inc.php file is as follows
Code:
<div id="subheader">
<?php get_custom_field('subheader');?>"
</div>
<!--Is this code live? Echo Pageon variable-->
<!--<?php get_custom_field('pageon');?>-->
<div id="main<?php get_custom_field('pageon');?>">
<div id="<?php get_custom_field('pageon');?>text">
<img src="/images/<?php get_custom_field('pageon');?>heading.jpg" />
<?php get_custom_field('blurb');?>
</div>
<div id="rtimg"></div></div>
<div id="bottomtext">
<?php get_page_content();?>
</div>
The function 'firstNav' in the main template returns the custom field 'pageon' correctly. In the .inc.php file it is as if the content is not being returned at all and the file not being processed... I do not see the added HTML content. Is there a cacheing functionality that I need to disable or clear?
This is the customfields plugin not the special pages although I may switch (will I need to re-do anything?).
Thanks!
Diana
If you want to see the issue live, sitemail me. I don't want to have the client ever find this thread. ;-)