Author Topic: Displaying News Articles  (Read 1960 times)

0 Members and 1 Guest are viewing this topic.

Offline howardhill

  • Newbie
  • *
  • Posts: 6
Displaying News Articles
« on: October 10, 2007, 09:32:55 AM »
Just bought NewsScript Pro but I am now stuck.

www.wantagechamberofcommerce.co.uk/index.shtml (Headlines)

I have the headlines working (using #include and shtml) but have 2 problems...

1. Why does it not show prev/next below the ($records_per_page=3) displayed headlines, as there are 5 headlines in total.

2. How do I display the News Articles so they have the same appearance as the rest of the site? At present I just get a plain white page with the article displayed.

Thanks
Howard

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Displaying News Articles
« Reply #1 on: October 10, 2007, 01:18:10 PM »
1. in your headlines template put [[page_selector]] somewhere outside of the <template></template> tags

Offline howardhill

  • Newbie
  • *
  • Posts: 6
Re: Displaying News Articles
« Reply #2 on: October 10, 2007, 02:13:37 PM »
OK - made some progress, but now the prev/next links take me out of my web page to a plain white page.

Howard

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Displaying News Articles
« Reply #3 on: October 10, 2007, 03:13:43 PM »
It would be best to run newsscript within an iframe if you want it to stay there.  When you using an #include, the links will open a new page.  Another option is to fully make your newsscript templates look like the rest of the site, but that might be painful if you use a lot of includes.  But I guess these are the two best options you have.

Offline howardhill

  • Newbie
  • *
  • Posts: 6
Re: Displaying News Articles
« Reply #4 on: October 11, 2007, 12:08:42 AM »
OK I will try using an iframe, thanks.

http://www.wantagechamberofcommerce.co.uk/index.shtml

How do I display the News Articles so they have the same appearance as the rest of the site? At present I get  the article displayed, but the look of the page is incomplete. I am using one of my own pages as the template, in place of the example (text.htm). I have simply included this in the page...

!-- "start news" -->
<template><br>
[[image]]<b>
[[headline]]</b><br><br>
[[text]]<br>
</template>
<!-- "end news" -->

The page is not being interpreted as it should be, so example, the header and nav bar are missing. It should look like this

http://www.wantagechamberofcommerce.co.uk/news.html

(that's just a static page)

Thanks
Howard

Offline howardhill

  • Newbie
  • *
  • Posts: 6
Re: Displaying News Articles
« Reply #5 on: October 11, 2007, 01:59:28 AM »
Ahha! Found the problem.

The template executes from the cgi-bin directory (whether it is located there or not). Hence my relative links were failing. I changed images/image.jpg to ../images/image.jpg and it now works.

Just need a bit of tidying up now, some iframe work, and we're in business.

Thanks,
Howard

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Displaying News Articles
« Reply #6 on: October 11, 2007, 02:53:18 PM »
Hi,

Sorry for being too late to reply.  Happy though you could solve the problem.  The template system of newsscript and the ezscripting scripts is very flexible, but it can lead to some headaches when it comes to relative links or some <html> tags that make your CSS not work until you inspect the code view of the resulting page to find the culprit.

Have fun using the script!