We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42101
    • 125 Posts
    Hi!

    I asked the question in a different context before. Now I am trying to get the pagetitle only on all pages except the home page (id=1 / alias=home).

    I am trying to see if it works in general:
    [[*alias:is=`home`:then=`[[$pagetitle]]`]]


    and

    [[!*alias:is=`1`:then=`[[$pagetitle]]`]]


    both won't work.

    The other question is: How to surpress the pagetitle only on "home" and show it on all other pages?



    Thanks,

    AD

    [ed. note: ad2003 last edited this post 13 years, 5 months ago.]
      • 4172
      • 5,888 Posts
      what is the content of your chunk 'pagetitle' ?

      and you should allways use :else ,when using conditionals!

      [[*alias:isnot=`home`:then=`[[$pagetitle]]`:else=``]]


      [[*id:isnot=`1`:then=`[[*pagetitle]]`:else=``]]


      [[*id:is=`1`:then=``:else=`[[*pagetitle]]`]]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 42101
        • 125 Posts
        Quote from: Bruno17 at May 01, 2013, 08:42 AM
        what is the content of your chunk 'pagetitle' ?

        and you should allways use :else ,when using conditionals!

        [[*alias:isnot=`home`:then=`[[$pagetitle]]`:else=``]]


        [[*id:isnot=`1`:then=`[[*pagetitle]]`:else=``]]


        [[*id:is=`1`:then=``:else=`[[*pagetitle]]`]]

        Hi Bruno!

        Thanks for the reply.
        The content of the chunk is:

        <h2 class="text-center">[[+pagetitle]]</h2> 


        I call all stuff on one page with getResources:

        [[getResources? &parents=`0`  &limit=`10` &includeContent=`1`  &includeTVs=`1` &processTVs=`1`  &tpl=`pages_block`  &sortdir=`ASC` &sortby=`{"menuindex":"ASC"}`]] 


        thanks!

        AD
          • 4172
          • 5,888 Posts
          should be

          <h2 class="text-center">[[*pagetitle]]</h2>
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 4172
            • 5,888 Posts
            using this inside a getResources template should be

            [[+id:isnot=`1`:then=`<h2 class="text-center">[[+pagetitle]]</h2>`:else=``]]
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 42101
              • 125 Posts
              Quote from: Bruno17 at May 01, 2013, 09:28 AM
              using this inside a getResources template should be

              [[+id:isnot=`1`:then=`<h2 class="text-center">[[+pagetitle]]</h2>`:else=``]]


              Thank you again bruno!

              That is working.

              AD