Welcome Guest, Not a member yet? Register   Sign In
Sample News Application - News Articles?
#1

[eluser]Unknown[/eluser]
In the link below:

Code:
<p><a href="news/&lt;?php echo $news_item['slug'] ?&gt;">View article</a></p>

I am getting this error:

404 Page Not Found
The page you requested was not found.

The url is:

http://localhost/index.php/news/cat

There is a slug 'cat'. In the view.php the code is:

Code:
&lt;?php
echo '<h2>'.$news_item['title'].'</h2>';
echo $news_item['text'];
?&gt;
i

It appears to replicate the code in this link with the exception of the addition of the slug.

Code:
http://localhost/index.php/news

So it looks like the database query is returning a null. Is that the issue?

Or is there supposed to be a 'cat' article somewhere too?

P.S. I t would be great to see a running application with a zip file of the code and db.


P.P.S. Looks like this has been addressed here:

&lt;!--url is wrong http://ellislab.com/forums/viewthread/231159/--&gt;

Documentation issue in conjunction with routing change fixed it up.




Theme © iAndrew 2016 - Forum software by © MyBB