Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

wrong URL being generated


Guest

Recommended Posts

I'm having some issues with the trying to get the artciles manager and dynamic_sitemap contributions to work together. The links to my article topics in my sitemap are being generated incorrectly.

 

For example the correct URL for artcile topic 5, the URL for the link should be:

 

/articles.php?tPath=5

 

But this is the link thats being generated in the sitemap:

 

articles.php?topics_id=5

 

i.e "topics_id=" instead of "tPath=". Below is the code I added to the sitemap.php to included links to my articles topics, can you see the issue?:

 

 

 

<?php
//ARTICLE MANAGER START
echo '<ul class="sitemap">';
echo '<li><a href="' . tep_href_link(FILENAME_ARTICLES, '', 

'NONSSL') . '">' . BOX_ALL_ARTICLES . '</a></li>' . ""; 
$topics_query = tep_db_query("select t.topics_id, td.topics_name, t.parent_id from " . 

TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where t.parent_id = '" . (int)

$topic_links[$i] . "' and t.topics_id = td.topics_id and td.language_id = '" . (int)

$languages_id . "' order by sort_order, td.topics_name");
if (tep_db_num_rows($topics_query) > 0) {
$row = 0;
while ($topics = tep_db_fetch_array($topics_query)) {
$row++;
echo '<li><a href="' . tep_href_link(FILENAME_ARTICLES, 'topics_id=' . $topics

['topics_id']) . '">' . $topics['topics_name'] . '</a></li>' . "";
}
}
echo '</ul>';
//ARTICLE MANAGER END
?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...