close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

wrong content is diaplaying

Thread began 10/10/2012 1:20 pm by JamieEff | Last modified 10/12/2012 12:08 pm by JamieEff | 1021 views | 7 replies |

JamieEff

wrong content is diaplaying

Hi Jason

Am trying to get this simple 'menu' working on this page news.php (the purple box).

When you click each link it goes to the right page but displays only the most recent article...

Have attached the file itself here as well

Cheers

Jamie

Attached Files
news.zip
Sign in to reply to this post

Jason ByrnesWebAssist

where you are trying to show the menu and the selected content area on the same page, you need to have 2 recordsets, one that is used to populate the menu, the second needs to be configured to filter the ContentPageSetOrder column on the zNews querystring variable that is being passed.

Sign in to reply to this post

JamieEff

but6 I am just copying one that I created some time ago (see attached) which only has the one recordset and does what I am trying to get the other one to do....why would this one work and not the other?

cheers

Jamie

Attached Files
index.zip
Sign in to reply to this post

Jason ByrnesWebAssist

on the news page, change:

php:
<?php

include('WA_CMS/addtosite.php');
echo 
WA_getCMSContent($database_PowerCMSConnection$PowerCMSConnection'zNews''Title'false$row_NewsPanelRS['ContentPageSetOrder']);
?></h2>
  <?php
include('WA_CMS/addtosite.php');
echo 
WA_getCMSContent($database_PowerCMSConnection$PowerCMSConnection'zNews''Content'false$row_NewsPanelRS['ContentPageSetOrder']);
?>




to:

php:
<?php

include('WA_CMS/addtosite.php');
echo 
WA_getCMSContent($database_PowerCMSConnection$PowerCMSConnection'zNews''Title'false);
?></h2>
  <?php
include('WA_CMS/addtosite.php');
echo 
WA_getCMSContent($database_PowerCMSConnection$PowerCMSConnection'zNews''Content'false);
?>



it works on the index page, because the the code to show the content is after the recordset loop meaning that the recordset is empty, so an empty value is passed by this code $row_NewsPanelRS['ContentPageSetOrder']

Sign in to reply to this post

JamieEff

ahhhh ok thats done the trick

as ever, many thanks Jason

Jamie

Sign in to reply to this post

JamieEff

Hey Jason

Using the same page as above... how would I get the date the entry was created?

have been trying to use

php:
<?php

include('WA_CMS/addtosite.php');
echo(
date("d/m/Y",strtotime($row_NewsPanelRS['ContentDate']))); 
?>



Obviously that doesnt work, but not sure what chanegs I would need to make to the recordset to get it to work

Many thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to create a new recordset as:

SELECT C2.ContentDate, C2.ContentGroup, C2.ContentPageSetOrder
FROM pcms2_contents AS C1 LEFT OUTER JOIN pcms2_contents AS C2 ON C2.ContentPagesetParentID = C1.ContentID
WHERE C1.ContentGroup = 'zNews' AND C2.ContentPageSetOrder = URLParam
GROUP BY C2.ContentPageSetOrder
ORDER BY C2.ContentPageSetOrder DESC


parameters:
name: URLParam
type: Integer
default value: 1
Run Time value: $_GET['zNews']

Sign in to reply to this post

JamieEff

thanks and have a great weekend

Jamie

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...