TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 629
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 521
  • Total: 521

Category List

Started by ElShotte, September 11, 2008, 12:22:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ElShotte

I realized that the whole theory is wrong in that statement, the reason it wont echo it is because TECHNICALLY $art['subject'] is not empty, just the if statement prevents it from displaying, what I need to do is check if $_GET['cat'] exists in as a value in $art['catID']

ElShotte

This statement seems to work:

//Checks to see if a specific category has been set
if(isset($_GET['cat'])) {

echo '<ul>';
//Foreach statement to display articles in a category
foreach($context['TPortal']['profile_articles'] as $story) {
if($_GET['cat']==$story['catID']) {
$noarticles = 'F';
echo '
<li><a href="' . $scripturl . '?action=przepisy&page=' . $story['id'] . '">' , $story['subject'] , '</a><br />';
echo '
</li>';                                                     
}
}
echo '</ul>';
//Checks if there is no articles.
if($noarticles!='F') {
echo 'There is no articles!';
}
} //End of specific category

This website is proudly hosted on Crocweb Cloud Website Hosting.