View Single Post
  #1  
Old 10-06-2017, 07:10 AM
  zeel's Avatar 
zeel zeel is offline
 

Member
  
Join Date: Oct 2017
Location: Ohio
Posts: 14
 

Default Determine what kind of page has been loaded within a template.

So my design has a very large header image at the top to showcase products. For things like the home page, I just want to show more or less random product images. For categories, I want to display the category image, and for products, I want to display the product image.

But those things all need to be in the same location on the page, so they end up in the same template. The problem is, while I figured out how to show the images I wanted, I can't figure out how to pick which one to display based on the kind of page that has been loaded.

I would think I could do something with a condition like:

Code:
if this.isProduct() then ...

But I can't find any reference that tells me what conditions are available to check.
__________________
Version: 5.3.3.3
Reply With Quote