List of articles Topic is solved

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
QoQoo
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Mon Feb 15, 2021 4:34 am

List of articles

Post by QoQoo » Sat Jul 24, 2021 1:17 pm

Hi.

How do I get a list of articles?

I want to incorporate this same functionality into my original template

https://www.seblod.com/resources/manual ... icles-blog

Do you have any recommended extensions that you can easily get?

QoQoo
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Mon Feb 15, 2021 4:34 am

Re: List of articles

Post by QoQoo » Sun Jul 25, 2021 1:50 am

I got it with ajax.

$.ajax({

url: 'index.php?option=com_content&format=ajax&lang=en&view=article&task=getArticles&tmpl=component',
type: 'post',

dataType: 'json',
async: true,
success: function(response){

var res ="";

for (var i = 0; i < response.length; i++) {

res += '<li><a href="/index.php?option=com_content&view=article&id=' + response[1] + '">・' + response[1] + response[0] + '</a></li>';


}

$("#tab_contenteria").append('<ul>' + res + '</ul>');

$('#modal2').modal("show");


},

error: function(XMLHttpRequest, textStatus, errorThrown){
alert('Error : ' + errorThrown);
}

});


Locked

Return to “Joomla! 3.x Coding”