1
wammes
smarty variable <{$story.topic_title}> is not giving what I want
  • 2010/7/14 19:27

  • wammes

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/1/3 1


Hi all,


In template news_item.html of the news module I'd like to have a smarty variable with just the name of the category in it.
<{$story.topic_title}> now gives the category name with a hyperlink in it. I just want the category name with no "
Can this be done without modifying the modules php files? Maybe with some smarty in the template?


Thanks

2
red_Slider
Re: smarty variable <{$story.topic_title}> is not giving what I want

Yes ... as I remember:
U got this:
<td class="itemHead">
<
span class="itemTitle">
<
a href="<{$xoops_url}>/modules/news/index.php?storytopic=<{$story.topicid}>">                     
<{
$story.topic_title}> : <{$story.news_title}>                 a>
span>
td>


and shoul be:
<td class="itemHead">                 
<
span class="itemTitle">                     <{$story.news_title}>                 
span>
td>


here U get all variables:
Quote:
* Template's variables : * @template_var string pagenav some links to navigate thru pages
* @template_var array story Contains all the information about the story
* Structure :
* @template_var int id Story's ID
* @template_var string posttime Story's date of publication
* @template_var string title A link to go and see all the articles in the same topic and the story's title
* @template_var string news_title Just the news title
* @template_var string topic_title Just the topic's title
* @template_var string text Defined as "The scoop"
* @template_var string poster A link to see the author's profil and his name or "Anonymous"
* @template_var int posterid Author's uid (or 0 if it's an anonymous or a user wich does not exist any more)
* @template_var string morelink Never used ???? May be it could be deleted
* @template_var string adminlink A link to Edit or Delete the story or a blank string if you are not the module's admin
* @template_var string topicid News topic's Id
* @template_var string topic_color Topic's color
* @template_var string imglink A link to go and see the topic of the story with the topic's picture (if it exists)
* @template_var string align Topic's image alignement
* @template_var int hits Story's counter of visits
* @template_var string mail_link A link (with a mailto) to email the story's URL to someone

3
wammes
Re: smarty variable <{$story.topic_title}> is not giving what I want
  • 2010/9/6 20:44

  • wammes

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/1/3 1


Hi red_Slider!

Thank you for your detailed reply.

I guess we are using a different version of the news module.
<{$story.topic_title}>

gives
<a href='http://www.blah.com/modules/news/index.php?storytopic=1'>xoopsa>


It should just give "xoops" but I get the a href as extra :).


4
ghia
Re: smarty variable <{$story.topic_title}> is not giving what I want
  • 2010/9/7 6:57

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


And what is your version?

5
wammes
Re: smarty variable <{$story.topic_title}> is not giving what I want
  • 2010/9/7 18:57

  • wammes

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/1/3 1


Hi,

I use the v1.63 news module.

6
ghia
Re: smarty variable <{$story.topic_title}> is not giving what I want
  • 2010/9/8 3:09

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Use
<{$story.news_title}>

7
wammes
Re: smarty variable <{$story.topic_title}> is not giving what I want
  • 2010/9/8 13:23

  • wammes

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/1/3 1


I just had a idea, and it worked. Smarty also has a option to strip the
<{$story.topic_title|strip_tags:false}>



Login

Who's Online

359 user(s) are online (214 user(s) are browsing Support Forums)


Members: 0


Guests: 359


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