Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6608201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:35:04+00:00 2026-05-25T19:35:04+00:00

I am making a module and trying to figure out how to get the

  • 0

I am making a module and trying to figure out how to get the Search engine friendly url to articles from this module

this is the helper class today

public function getItems($amount)
{
$db = &JFactory::getDBO();


$query = 'SELECT * FROM `#__content`, `#__content_frontpage` WHERE `#__content_frontpage`.content_id = `#__content`.id AND `#__content`.state = 1 ORDER BY `#__content`.publish_up DESC LIMIT ' . $amount  . '';



$db->setQuery($query);
$items = ($items = $db->loadObjectList())?$items:array();



return $items;
} //end getItems

And this is the default.php to display stuff

<ul class="frontpage_news">
    <?php foreach ($items as $item) { ?>
    <li>
    <div class="frontpage_date"><?php echo JText::sprintf('DATE_FRONTNEWS', $item->publish_up); ?></div>
    <div id="ffTitle" class="frontpage_title"><a href="#"><?php echo JText::sprintf('TITLE_FRONTNEWS', $item->title); ?></a></div>
    <div id="ffRead" class="frontpage_readmore"><a href="#"><?php echo JText::sprintf('READ_MORE_FRONTNEWS'); ?></a></div>
    </li>
    <?php } ?>
</ul>

So how do I get the correct link to each article displayed in SEF format?

Thanks for any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:35:05+00:00Added an answer on May 25, 2026 at 7:35 pm

    For Joomla 1.5:

    echo JRoute::_(ContentHelperRoute::getArticleRoute($article_id_and_alias, $category_id_and_alias, $section_id));
    

    For Joomla 1.6/1.7:

    echo JRoute::_(ContentHelperRoute::getArticleRoute($article_id_and_alias, $category_id));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a little message sending module. It'll handle queuing messages from a request
In a related question I'm trying to figure out how a Python web application
Since I'm trying to be efficient in this program I'm making, I thought I'd
I'm making a call to a program from the shell using the subprocess module
I am trying to mock out a private method that is making a JNDI
I'm trying to get images from a minoru3d webcam, which is actually two Vimicro
im making some script with mechanize.browser module. one of problem is all other thing
Making my first steps with NHibernate, I'm trying to have it creating my Tables
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created
I am trying to build a webservice that manipulates http requests POST and GET.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.