Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • IPS Customization.

    While building this website I have learned a lot about how to customiza different aspects of the IPS products. I see a lot of people struggling to get started with IPS and this section is my attempt to gather what I have learned so others can benefit as well.

    To me nothing is more important than to share knowledge and help others. This section contain my findings and the things I have learned, but I still have much more to learn as well. Together we can learn and evolve the ways we customize the IPS products and while doing that there are no stupid questions. In the forum you can ask any question and we will try our best to answer them.

    Go to the IPS Forum ->
  • Show block only on the startpage for Databases


    Jimi Wikman
     Share

    Sometimes you want to show a block only on the start page of a database and since if you add a block to the template it show up everywhere in the database, that can be annoying. Don't worry though, there is an easy fix for this.

    In your block add this as the first line:

    {{if \IPS\Request::i()->app == 'cms' and \IPS\cms\Databases\Dispatcher::i()->categoryId == 0}}

    Then close it with {{endif}} on the last row.

    This little snippet will check to see if you are in a category or not. On the start page you are not in a category yet, so the result will be 0. On all other pages this check will not be true, so it will not show there.

    You can use this to target specific categories as well, or show things everywhere else but on the start page.

     

     Share


    User Feedback

    Recommended Comments

    There are no comments to display.



    Please sign in to comment

    You will be able to leave a comment after signing in



    Sign In Now

×
×
  • Create New...