in_context()

Hi,

Can anyone tell me what all the available in_context() are? I've seen:

in_context(ZP_ALBUM)
in_context(ZP_IMAGE)
in_context(ZP_SEARCH)

I am trying to display different content based on this function. Also is there something for zenpage distinguishing pages, news, and news article?

Thanks!

Comments

  • acrylian Administrator, Developer
    There is:
    `
    in_context(ZP_ZENPAGE_NEWS_ARTICLE)
    in_context(ZP_ZENPAGE_NEWS_CATEGORY)
    in_context(ZP_ZENPAGE_PAGE)
    in_context(ZP_ZENPAGE_NEWS_DATE)
    `
    But you can also use the zenpage-template-functions like `is_Page(), is_NewsArticle()` etc. See the quick reference pdf that is included in the package or the documentation.

    What are you trying to do? If you use the standard theme files you don't need to check. You can also check via the objects.
  • Thanks Acrylian - just what I needed for zenpage. I am looking for a method to display certain content (latest news, latest comments, etc) in a sidebar dependant in what context you are (or page). Are there any more for zp core besides the ones I mention above? Is there one to determine if you are on the index page?

    I suppose I could make separate sidebar files for each context, but I would rather use conditional statements in one sidebar for all...:)
  • I just took a look at the pdf's included in the package - wow never noticed these before they are an awesome resource! Thanks - I see what I need...
  • Acrylian - what do the _LINKED in_context() distinguish?
  • acrylian Administrator, Developer
    The refers to images/albums in search context when they are not really in context of their own image/album.

    The pdfs were introduced with 1.2.6.
Sign In or Register to comment.