Display extrafield as one word command.

Discussion in 'Customizations' started by damiun, Dec 1, 2009.

  1. damiun Customer

    Hi,

    I found how to do this for the showlisting page,

    But how can i do this for the viewlisting page?
  2. Eric Barnes Guest

  3. damiun Customer

    I know extra field,
    But i am talking about transforming them into a new command (so i can use if commands)

    Dominick
  4. Eric Barnes Guest

    You can use capture for this:
    Code:
    {capture name=test assign=myvar}
    {get_extra_field id=$view fid=11}
    {/capture}
    {if $myvar == 'test'}
    {$myvar} equals test
    {else}
    It does not equal test.
    {/if}
    
  5. damiun Customer

    I have to add that to the top of the viewlisting(2).tpl page right?
  6. Eric Barnes Guest

    I would do the capture at the top:
    Code:
    {capture name=test assign=myfieldone}
    {get_extra_field id=$view fid=1}
    {/capture}
    {capture name=test assign=myfieldtwo}
    {get_extra_field id=$view fid=2}
    {/capture}
    
    Then use the if statement where you want it to appear in the page.

Share This Page