1
unhookt
EASY? News module index title
  • 2007/10/11 18:24

  • unhookt

  • Just popping in

  • Posts: 5

  • Since: 2007/10/11


I am trying to insert the title of a news category somewhere in the index.php page for a specific topic. Right now, the topic description is coming up, naturally, because the following code is located in the news_index.html template:

<{$topic_description}>

What is the appropriate syntax to replace "<{$topic_description}>" with in order to get the topic name, not description, to appear?

I've tried:

<{$topic}>
<{$topictitle}>
<{$topic_title}>
<{$topic_name}>
<{$storytopic}>

and I get nothing.

Thanks!

2
unhookt
Re: EASY? News module index title
  • 2007/10/11 19:16

  • unhookt

  • Just popping in

  • Posts: 5

  • Since: 2007/10/11


Ok, here's how I fixed/addressed this:

In index.php for the news module, I changed:

Quote:

if($xoopsOption['storytopic']) {
$xt->getTopic($xoopsOption['storytopic']);
$xoopsTpl->assign('topic_description', $xt->topic_description('S'));
$xoopsTpl->assign('topic_color', '#'.$xt->topic_color('S'));
$topictitle=$xt->topic_title();
}


to

Quote:

if($xoopsOption['storytopic']) {
$xt->getTopic($xoopsOption['storytopic']);
$xoopsTpl->assign('topic_title', $xt->topic_title('S'));
$xoopsTpl->assign('topic_description', $xt->topic_description('S'));
$xoopsTpl->assign('topic_color', '#'.$xt->topic_color('S'));
$topictitle=$xt->topic_title();
}


Thoughts, feedback? Will I be sorry I did this?

3
iHackCode
Re: EASY? News module index title

sorry, no.

thats how its done. good job.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

Login

Who's Online

388 user(s) are online (226 user(s) are browsing Support Forums)


Members: 0


Guests: 388


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits