Do not remember me!
/ / / Show specific xfields in shortstory.tpl

Show specific xfields in shortstory.tpl

Im trying to add specific xfields in front page`s - shortstory.tpl
I have 3 categorys for news: Books, Movies, Games
And I want to show in shortstory.tpl
For Books this xfields: Author, Producer, Year
For Games: Genre, Year, Company
For Movies: Genre, Year, Actor, Director

I made the xfields for that categorys only in admin panel but in Shortstory.tpl I added

<span class="s-date">Име на книга: <b>[xfvalue_book-name]</b></span></br>
<span class="s-date">Автор: <b>[xfvalue_avtor]</b></span></br>
<span class="s-date">Издателство: <b>[xfvalue_izdatelstvo]</b></span></br>
<span class="s-date">Година: <b>[xfvalue_godina]</b></span></br></br>


But this xfields show on ALL news in ALL categorys... How can I limit them for only Category Games this xfields, for category Movies that xfields etc.?

Show specific xfields in shortstory.tpl

You can see in the picture, 2 different news, from 2 different categorys, have all the same xfields.

I managed to make it to here:
Show specific xfields in shortstory.tpl

Added by: in HTML/TPL Questions on



+1

Comments 1

  1. besoh
    0
    besoh Currently Offline → 3 June 2016 06:53

    You might have probably fixed this by now, however the solution for this is done this way.
    At Admin panel, choose those xfields to appear only for the categories you want to.
    then edit the code in your shortstory.tpl to this:
    [xfgiven_book-name]<span class="s-date">Име на книга: <b>[xfvalue_book-name]</b></span></br>[/xfgiven_book-name]
    [xfgiven_avtor]<span class="s-date">Автор: <b>[xfvalue_avtor]</b></span></br>[/xfgiven_avtor]
    [xfgiven_izdatelstvo]<span class="s-date">Издателство: <b>[xfvalue_izdatelstvo]</b></span></br>[/xfgiven_izdatelstvo]
    [xfgiven_godina]<span class="s-date">Година: <b>[xfvalue_godina]</b></span></br></br>[/xfgiven_godina]
     1 |  3

Information

Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.