Have menu working in list page but it wont work on detail page

6 posts by 3 authors in: Forums > CMS Builder
Last Post: August 14, 2014   (RSS)

By ross - July 31, 2014

Hi willydoit

Thanks for posting. I see what you are aiming for here and my first suggestion is to change this code (on priory_detail.php):

// load records from 'bridlington_priory'  

list($bridlington_prioryRecords, $bridlington_prioryMetaData) = getRecords(array(    
'tableName'   => 'bridlington_priory',    
'loadUploads' => true,    
'allowSearch' => true,  
));

to

// load records from 'bridlington_priory'  
list($bridlington_prioryRecords, $bridlington_prioryMetaData) = getRecords(array(    
   'tableName'   => 'bridlington_priory',    
   'loadUploads' => true,    
   'allowSearch' => false,  
));

If that doesn't get things going, could you post a copy of the whole detail page so I can review all the code?

Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

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: http://www.interactivetools.com/consulting/

By willydoit - August 1, 2014

Hi Ross,

Thanks for that, unfortnately it didn't make any difference. I have uploaded the full priory_detail.php for you to look at. I cannot understand why it doesn't work as it works fine on the listing page and I am loading the same records.

Attachments:

priory_detail.php 29K

By gregThomas - August 5, 2014

Hi willydoit,

I've had a look at your code, and it looks fine to me. For this part of your code:

<select name="prioryID">
  <?php foreach (getListOptions('bridlington_priory', 'pages') as $value => $label): ?> 
    <option value = "<?php echo $value;?>" <?php selectedIf($value, @$_REQUEST['pages']);?>><?php echo $label; ?></option> 
  <?php endforeach ?>
</select>

What are you storing as the value for the field? Is it the record num? (See attached image for example).

I'm wondering if the code isn't working because the num value isn't being sent over. 

Thanks,

Greg

Greg Thomas







PHP Programmer - interactivetools.com
Attachments:

CMS Builder.png 115K

By willydoit - August 5, 2014

Hi Greg,

I am not in the office at the moment and it was last week when I created the page but working from memory it is the record number.

By gregThomas - August 14, 2014

Hi willydoit,

I'm still not sure what's causing the issues. Would it be possible to send me a link to the page so I can do some testing? If you don't want to post the link in the forum you can send it in an email to support@interactivetools.com.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com