Jump to content

Conditional for ForumID in forumTable Template?


GrooveOnBeat

Recommended Posts

Posted

I'm trying to call several forum ID's in the forumTable template. The attributes that are available are "$table" and "$rows". I tried the following but they didn't work;

didn't work
{{if in_array($table->id, array(5,6,7))}}

didn't work
{{if in_array($table->Id, array(5,6,7))}}

didn't work
{{if in_array($table->uniqueId, array(5,6,7))}}

didn't work
{{if in_array($rows->id, array(5,6,7))}}

didn't work
{{if in_array($rows->uniqueId, array(5,6,7))}}

Any ideas? :unsure:

Posted

Try

{{if in_array( \IPS\Request::i()->id, array(5,6,7))}}
yes in 5
{{endif}}

Or use tables where statement.

{{if in_array( $table->where[0][1], array(5,6,7))}}
yes in 5
{{endif}}

 

Posted

Try

{{if in_array( \IPS\Request::i()->id, array(5,6,7))}}
yes in 5
{{endif}}

Or use tables where statement.

{{if in_array( $table->where[0][1], array(5,6,7))}}
yes in 5
{{endif}}

 

Excellent! Both codes worked like a charm! Always helpful, Mike! Thanks! :smile:

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...