Problem with Page viewer with merged data

4 posts by 2 authors in: Forums > CMS Builder
Last Post: October 7, 2010   (RSS)

By gadefgaertgqe - September 30, 2010 - edited: September 30, 2010

Hi there,

I am merging news data using the array_merge command.

The news data lists fine.

However when I click on a news item to display it in detail with the page viewer, it quite often loads the wrong one.

Obviously this is because the data is merged and the order of the data is different and it seems to access the first news articles that are added to the array_merge.

Any advice on how to get round this?

Thanks

Paul

Re: [8bit Gamer] Problem with Page viewer with merged data

By gadefgaertgqe - October 1, 2010 - edited: October 1, 2010

Fixed!!

I have no hair left but it turns out the solution was simple thanks to finding this post:

http://www.interactivetools.com/iforum/Products_C2/CMS_Builder_F35/gforum.cgi?post=78609;search_string=array_merge;t=search_engine#78609

For those of you working with simple array_merge but problems with the link going to the wrong article....

I was using:
<a href="<?php echo $record['_link'] ?>
But I am now using:
<a href="news-detail.php?title=<?php echo urlencode($record['title']);?>
I also had to remove from the detail viewer code:
'where' => whereRecordNumberInUrl(1),

If anyone thinks I have gone about this the wrong way please let me know!!

CMS builder is so powerful for even us noobs to solve problems! I really wish my work place would let me study PHP and not expect me to magic up solutions on the fly lol!!

Hope this helps!

Paul

Re: [Damon] Problem with Page viewer with merged data

I was not aware of that and very useful! Thanks Damon!