Announcement

Collapse
No announcement yet.

Hiding Content from registered customers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hiding Content from registered customers

    We have the NOTINB2B tags to show hidden content to registered users, anyone know of a way of doing the reverse, ie hiding content from registered users?

    #2
    Place the NOTINB2B tags around the code in the following form:

    NOTINB2B
    <!--
    NOTINB2B

    Code here

    NOTINB2B
    -->
    NOTINB2B

    Comment


      #3
      That's what we use to hide content from retail customers though isn't it?

      Comment


        #4
        No that's just:

        NOTINB2B

        Code here

        NOTINB2B

        Comment


          #5
          Ok thanks, i'll try that then.

          Comment


            #6
            While not a solution to your problem, I thought I'd mention this: when I wanted to show something to registered customers only I surrounded the code with <Actinic:ONLYINB2B></Actinic:ONLYINB2B> - which, at the time, seemed to be a more streamlined way of doing it - though I can't now remember why I thought that. It still works well though.

            Comment


              #7
              Thanks Mark, i never even knew that existed as a tag you can use and actinic have seemingly never detailed that one, so one up for the users if indeed that does does work, nice one! How the hell did you find that?

              My findings show that this is how you serve up content exclusively to registered users, BUT you have to have uncompacted html selected in design-design options:

              <Actinic:NOTINB2B><!--</Actinic:NOTINB2B>
              INSERT CODE HERE
              <Actinic:NOTINB2B>--></Actinic:NOTINB2B>

              If you want to hide content from registered users then just the below code seems to work fine:

              <Actinic:NOTINB2B>
              INSERT CODE HERE
              </Actinic:NOTINB2B>

              Comment


                #8
                Yeah, now I remember why I tried to find an alternative - because I wanted to compact my code.

                Comment


                  #9
                  How the hell did you find it lol? I'm impressed Mr Attenborough!

                  Comment


                    #10
                    Thanks for the thanks, Lee! I found it by looking at the existing code - in my 'checkout 0' > Both Addresses Address Fields layout, I saw that there was the following:
                    Code:
                    <Actinic:ONLYINB2B>
                    		<th class="DeliverField" id="idDeliverHeader"><actinic:variable name="DeliverTitle" /></th>
                    </Actinic:ONLYINB2B>
                    I don't know if this is in mine because our site was started off in version 7, which was subsequently upgraded through version 8, 9, and 10.

                    But I've tried it, it works on our site, and it certainly streamlines the code from:
                    Code:
                    <Actinic:NOTINB2B><!--</Actinic:NOTINB2B> 
                    Code to be hidden
                    <Actinic:NOTINB2B>--></Actinic:NOTINB2B>
                    to:
                    Code:
                    <Actinic:ONLYINB2B>Code to be hidden</Actinic:ONLYINB2B>
                    AND you don't have to turn off code compacting.

                    Comment


                      #11
                      Top man, great find, one for the KB me thinks!

                      Comment

                      Working...
                      X