Posted By

ryarwood on 11/02/11


Tagged

template conditional ExpressionEngine channel


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

petrichbg


EE Multi Template Page if statement


 / Published in: PHP
 

  1. {if segment_2 == ""}
  2.  
  3. {exp:channel:entries channel="static_content" disable="member_data|pagination" limit="1" sort="asc" url_title="history"}
  4.  
  5. <h1>{title}</h1>
  6. {page_copy}
  7.  
  8. {/exp:channel:entries}
  9.  
  10. {if:elseif segment_2 == "technology"}
  11.  
  12. {exp:channel:entries channel="static_content" disable="member_data|pagination" limit="1" sort="asc"}
  13.  
  14. <h1>{title}</h1>
  15. {page_copy}
  16.  
  17. {/exp:channel:entries}
  18.  
  19. {if:else}
  20.  
  21. {exp:channel:entries channel="static_content" disable="member_data|pagination" limit="1" sort="asc"}
  22.  
  23. <h1>{title}</h1>
  24. {page_copy}
  25.  
  26. {/exp:channel:entries}
  27.  
  28. {/if}

Report this snippet  

You need to login to post a comment.