How can I link my article to other page?

Asked by juhohei

So, I would like to have index.php page that only shows the titles of the articles, and when I click the title it will show the full article in fullarticles.php. Can this be done?

*****************

I have made a template called "headlines" that sounds like this:

<div>
<h1> <a href="{article_href}" style="text-decoration: none;">{title}</a></h1>
<h2>{date} | Kommentit: <strong><a href="{article_href}#comments">{comment_count}</a></strong></h2>
</div>
<div>
<h1>{sub_title}&#8364;</h1>
</div>

*******************

Then I have this code in my index.php:

?php
/*
 This file is used to generate articles managed by the phpns system.
 Place this code wherever you want your articles displayed on your
 website. The page that this code is placed in should have a .php
 extension.
*/

 $phpns['category'] = '33';
 $phpns['limit'] = '20';
 $phpns['template'] = '9';
 $phpns['script_path'] = 'fullarticles.php';

 //after variable declaration(s), include shownews.php
 include("/var/www/vhosts/mypath/uutiset/shownews.php");
?

*******************

Question information

Language:
English Edit question
Status:
Answered
For:
phpns Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
alecwh (alecwh) said :
#1

So, what's wrong with it? It looks like your script should work perfectly, so tell me what the error is.

Revision history for this message
Winglet (serbianwings) said :
#2

Just put "$phpns['script_link] = 'fullarticles.php' " instead of ['script_path']

Can you help with this problem?

Provide an answer of your own, or ask juhohei for more information if necessary.

To post a message you must log in.