close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Power CMS Blog

Thread began 10/12/2014 9:11 pm by Mike Perry | Last modified 10/15/2014 11:07 am by Jason Byrnes | 1034 views | 19 replies |

Mike Perry

Power CMS Blog

I'm using PowerCMS to build a simple blog. Obviously I want the index page to include a listing of the most recent blogs. I wold like the listing to include the title and the first 70 words or so of the post. With the structure of the default cms tables how can I extract the blog title and the blog content to a single record, since they exist in separate records? I can use the ContentPagesetOrder field to tie the two together, but I've been unable to write a SELECT statement that will put them both in one record.

I need the recordset to include both the title and the content. How can I accomplish this??

Sign in to reply to this post

Jason ByrnesWebAssist

See this tutorial for details:

http://www.webassist.com/tutorials/Create-new-pages-from-PowerCMS-templates

Sign in to reply to this post

Mike Perry

This post has been deleted.

Mike Perry

I have two types of ContentRefID -- BlogPostTitle and Content. I also need to include the Content data in the recordset so t hat it is available as a separate field in the same record as the BlogPostTitle. The Results page just pulls the Title. . .

ETA: Think I got it --just modify the Detail page to show the limited Content. Getting the repeating region to work may be tricky. . .

ETA2: Repeating section works fine, if anyone is duplicating this. . .

Sign in to reply to this post

Jason ByrnesWebAssist

Glad to hear you have it working.

Sign in to reply to this post

Mike Perry

Thanks -- another question.

I want to use the Results page to provide a listing of posts for a given month. I've altered the SQL to this:

SELECT C2.ContentGroup, C2.ContentPageSetOrder
FROM pcms2_contents AS C1 LEFT OUTER JOIN pcms2_contents AS C2 ON C2.ContentPagesetParentID = C1.ContentID
WHERE C1.ContentGroup = 'BlogPost' AND C1.ContentDate > d1 AND C1.ContentDate < d2
GROUP BY C2.ContentPageSetOrder
ORDER BY C2.ContentPageSetOrder DESC

adding the ContentDate parameters to the query. d1 and d2 are configured properly and available (returning 2013-04-01 00:00:00 and 2013-06-01 00:00:00 respectively to the results page), but the query doesn't filter the results.

Thoughts??

Sign in to reply to this post

Jason ByrnesWebAssist

need more details. i don't see d1 and d2 defined anywhere, how are those defined?

Sign in to reply to this post

Mike Perry

I didn't post the variable declarations, but here they are

d1
Text
Default -1
$_GET['d1']

d2
Text
Default -1
$_GET['d2]

The variables display correctly on the Results page when echoed. . .

Sign in to reply to this post

Jason ByrnesWebAssist

try using:

WHERE C2.ContentGroup = 'BlogPost' AND C2.ContentDate > d1 AND C2.ContentDate < d2

for the where clause

Sign in to reply to this post

Mike Perry

Still doesn't filter. . .

I have d1 and d2 set to a date earlier than the first ContentDate, and the results page still returns the first record in the db

Sign in to reply to this post
loading

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...