List all articles in Joomla

I am trying to have all my articles listed on a page in Joomla as is done on this page:

http://www.paydayloans.co.uk/news/index.html

exactly the same style...

I have tried using the menu manager with the various options but they are all the wrong format...
EverlearnerAsked:
Who is Participating?
 
Andrew DerseConnect With a Mentor IT ManagerCommented:
Alright so here's how to accomplish what you need:

1) Download and install Jumi component.
2) Copy and paste this code in your favorite php/html editor: (Make sure to change the database connection variables...

 
<?php 

$con = mysql_connect("localhost(change as needed)","root(change as needed)","***********(Change as needed)");
 if (!$con)
   {
   die('Could not connect: ' . mysql_error());
   }
 
mysql_select_db("j15", $con);

$query=mysql_query("SELECT * FROM jos_content order by title ASC");
while($row = mysql_fetch_array($query)) {
$article_id = $row['id'];
$title = $row['title'];
$alias = $row['alias'];
$published = $row['publish_up'];
$published_clean = preg_split('/ /', $published);
$published_clean = preg_split('/-/',$published_clean[0]);

$date2 = date("D, d M Y", mktime(0, 0, 0, $published_clean[1], $published_clean[2], $published_clean[0]));

echo '<a href="index.php?option=com_content&view=article&id='.$article_id.'">'.$title.'</a> - <i>'.$date2.'</i><br />'; 	
}

?>

Open in new window


3) Create a new Jumi item through the Jumi Component and point it to the custom page you just created.  (I generally save all of my Jumi articles in this location 'components/com_jumi/files/..)  This way I can just type in this in the "Path to file:" field:  components/com_jumi/files/test.php (or whatever you name the file).
4) Create a new menu item to point to that Jumi item you just created.
5) View the results.

Please let me know if you need any help with any of the steps.
0
 
teomcamCommented:
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Andrew DerseIT ManagerCommented:
This is something you can custom code into Joomla.

Are you familiar with PHP and MySQL?

If so, I can create a procedure and provide you with the code to develop this page.
0
 
EverlearnerAuthor Commented:
HI there, yeah I am familiar  with php and mysql, I'm unfamiliar with joomla though... that will be great if you could thanks!
0
 
Andrew DerseIT ManagerCommented:
Alright, the first step you will need to do is download and install this extension:  (Jumi)
http://extensions.joomla.org/extensions/edition/custom-code-in-content/1023?qh=YToxOntpOjA7czo0OiJqdW1pIjt9

Jumi will allow you to write custom code into your Joomla pages.

While you are doing that I will come up with the code to display all of the articles for you.
0
 
Andrew DerseIT ManagerCommented:
This is what it looks like upon completion.
13.PNG
0
 
EverlearnerAuthor Commented:
Hi Thanks for your response.... when I create a new menu item, It asks me what type of item to create, if I select jumi it gives me 2 optiions blog or jumi, neither of which is outputting what I expect, what have I missed out?
0
 
EverlearnerAuthor Commented:
Awesome I just figured what I did wrong.....I modified it to onlyl included articles from certain categories and also descending dates.... what if I want the link to the article to be SEF, how do I do that?
0
 
Andrew DerseIT ManagerCommented:
Well, I honestly don't think I can work that magic...

I thought we could do a string split using PHP and replace the title spaces with hyphens, but it's not working properly.

All I can do for you buddy is get the non-sef links working...sorry.
0
 
EverlearnerAuthor Commented:
yeah it's weird I tried that , but the pages just come up blank... Thanks for your help with this
0
 
EverlearnerAuthor Commented:
do you think it will be possible if I use a plugin like sh404SEF?
0
 
Andrew DerseIT ManagerCommented:
That might work...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.