11 years ago
Topic

Hi,

I just wanted to get the Articles from the database.

$query = "SELECT * FROM #__content";
$db = JFactory::getDBO();
$db->setQuery($query);
$articles = $db->loadObjectList();
foreach($articles as $article){
  //echo 'ID:' . $article->id . '<br>';
   echo 'Title: ' . $article->title . '<br>';
   //echo 'Alias: ' . $article->alias . '<br>';
   echo 'Introtext: ' . $article->introtext . '<br>';
   echo 'Fulltext: ' . $article->fulltext . '<br>';
   //echo 'State: ' . $article->state . '<br>';
   //echo 'Cat.ID: ' . $article->catid . '<br>';
   //echo 'Images: ' . $article->images . '<br>';
   //echo 'Urls: ' . $article->urls . '<br>';
   //echo 'Attributes: ' . $article->attribs . '<br>';
   //echo 'Ordering: ' . $article->ordering . '<br>';
   //echo 'Metakey: ' . $article->metakey . '<br>';
   //echo 'MetaDesc: ' . $article->metadesc . '<br>';
   //echo 'MetaData: ' . $article->metadata . '<br>';
   //echo 'Access: ' . $article->access . '<br>';
   //echo 'Featured: ' . $article->featured . '<br>';
   echo 'Language: ' . $article->language . '<br>';  
}


I get this cryptic seblod stuff instead of the content!?

introtext = ::cck::6::/cck::<br />::news_image_x::1::/news_ima..., fulltext = ::cck::6::/cck::


[ btw. can I upload images here in this forum for visualization? ]




Get a Book for SEBLOD
11 years ago
1
Level 1

Hi Foomla,

Thank you for your post and welcome to SEBLOD forum.

For your question, why you would like to get articles from database? SEBLOD offers tools and framwork to display and manage articles directly by configuring content types and/or search types.

Regards,
Mehdi.

11 years ago
0
Level 2

Hi Mehdi,
thanks for your feedback.
I would like to reduce unnecessary code in my projects that joomla & seblod create, but I would like to use some core features of these 2  great tools.

Get a Book for SEBLOD