Announcement

Collapse
No announcement yet.

Login page misbehaving

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

    Login page misbehaving

    I have a black of code which displays a certain image when a user is logged in using

    <Actinic:NOTINB2B>
    <img src="header.gif" width="762" height="125" border="0"> </Actinic:NOTINB2B>
    This is followed by a block of code which displays the same image only for certain logged in customers using

    <Actinic:SHOWFORPRICESCHEDULE
    Schedules="1,4"
    HTML="<img src="header.gif" width="762" height="125" border="0" >"/>
    This works perfectly except on the Login Page (prior to actually logging in) where the image gets displayed twice! This is unexpected as it should only meet the 1st criteria ie. <Actinic:NOTINB2B>

    Any ideas

    #2
    The following block tests whether the user is on the login page. Slightly modified code that was originally posted by Jo at Pinbrook.

    Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27%3cactinic%3avariable%20name%3d%22Login%22%20%2f%3e%27" ></actinic:block>
    "Opportunities multiply as they are seized." - Sun Tzu

    Comment


      #3
      Thanks. However it's still not working, this is what i have now but the image is still being displayed twice on the Login Page.

      <Actinic:NOTINB2B>
      <img src="header.gif" width="762" height="125" border="0">
      </Actinic:NOTINB2B>

      <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27%3cactinic%3avariable%20name%3d%22Login%22%20%2f%3e%27" >
      <!--
      </actinic:block>

      <Actinic:SHOWFORPRICESCHEDULE
      Schedules="1,4"
      HTML="<img src="header.gif" width="762" height="125" border="0" >"/>

      <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27%3cactinic%3avariable%20name%3d%22Login%22%20%2f%3e%27" >
      -->
      </actinic:block>
      I've checked the actinic PageType variable and it's = 'Login' as expected.

      Comment


        #4
        You're on the right track but you missunderstood the purpose of the block. You needed to wrap your entire bit of coding in the block.

        Copy and paste the following:

        Code:
        <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27%3cactinic%3avariable%20name%3d%22Login%22%20%2f%3e%27" >
        <img src="header.gif" width="762" height="125" border="0">
        </actinic:block>
        
        <Actinic:NOTINB2B>
        <img src="header.gif" width="762" height="125" border="0">
        </Actinic:NOTINB2B>
        
        <Actinic:SHOWFORPRICESCHEDULE
        Schedules="1,4"
        HTML="<img src="header.gif" width="762" height="125" border="0" >"/>
        You will notice that I have made two copies of your code. The first copy is wrapped in the login test block and the other not. I have removed the code which calls the header image for "schedules=1,4" and only given the code that calls the image as the rest is redundant.

        What this does is firstly tests if this is the login page. If true, display header. If false, run your custom code.

        You could also wrap the second copy of your code in another block...

        Code:
        <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%27login%27" ></actinic:block>
        This block checks that this is not the login page. If true, run the code.
        "Opportunities multiply as they are seized." - Sun Tzu

        Comment


          #5
          Now that all makes perfect sense but the header image is still being displayed twice on the Login Page. This is what i have

          //If Login Page show header
          <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27%3cactinic%3avariable%20name%3d%22Login%22%20%2f%3e%27" >
          <img src="header.gif" width="762" height="125" border="0">
          </actinic:block>

          //If NOT Login Page, Process Code
          <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%27login%27" >
          <Actinic:NOTINB2B>
          <img src="header.gif" width="762" height="125" border="0">
          </Actinic:NOTINB2B>

          <Actinic:SHOWFORPRICESCHEDULE
          Schedules="1,4"
          HTML="<img src="header.gif" width="762" height="125" border="0" >"/>
          </actinic:block>

          Comment


            #6
            Tested it and the code works for me.

            Do you have a link that we can have a look at?
            "Opportunities multiply as they are seized." - Sun Tzu

            Comment


              #7
              Its a live site but...

              https://www.daisydaze.co.uk/cgi-bin/...NID=Index.html


              [URL="http://www.daisydaze.co.uk/acatalog/Category.html[/URL]

              Comment


                #8
                What shows on the design tab when you select the login page?

                Comment


                  #9
                  Ooops

                  Catalog Page

                  Login Page

                  Comment


                    #10
                    What shows on the design tab when you select the login page?
                    The header image is shown but only one instance of it.

                    Comment


                      #11
                      2nd Oops, we can't access your intranet.

                      Comment


                        #12
                        No?

                        Login Page

                        Comment


                          #13
                          All of this is now a little over my head but it looks like there is a problem with your schedules="1,4" code.

                          If you view the source code of your login page you will find the following:

                          Code:
                          <div id="container">
                          <!-- IF Login Page -->
                          
                          <img src="daisydaze_header.gif" width="762" height="125" border="0">
                          
                          <img src="daisydaze_header.gif" width="762" height="125" border="0" >
                          
                          <!--<img src="daisydaze_header.gif" width="762" height="125" border="0">-->
                          The second image is being displayed because the following code is being parsed when it shouldn't be.

                          Code:
                          <Actinic:SHOWFORPRICESCHEDULE
                          Schedules="1,4"
                          HTML="<img src="header.gif" width="762" height="125" border="0" >"/>
                          The same source on your catalog pages:

                          Code:
                          <div id="container">
                          <!-- IF Login Page -->
                          
                          <Actinic:NOTINB2B>
                          <img src="daisydaze_header.gif" width="762" height="125" border="0">
                          </Actinic:NOTINB2B>
                          
                          <Actinic:SHOWFORPRICESCHEDULE
                          Schedules="1,4"
                          HTML="&#60;img src=&#34;daisydaze_header.gif&#34; width=&#34;762&#34; height=&#34;125&#34; border=&#34;0&#34; &#62;"/>
                          
                          <!--<img src="daisydaze_header.gif" width="762" height="125" border="0">-->
                          "Opportunities multiply as they are seized." - Sun Tzu

                          Comment


                            #14
                            Try an upload with your code uncompacted (DESIGN | DESIGN OPTIONS) and see if that solves anything, failing that paste the code from your login page into here (the code you see on the design tab that is).

                            Comment


                              #15
                              Try an upload with your code uncompacted (DESIGN | DESIGN OPTIONS) and see if that solves anything,
                              My code is uncompacted all the time, should i compact it

                              failing that paste the code from your login page into here (the code you see on the design tab that is).
                              This the code i see in the Design tab of the login page

                              Code:
                              <!-- IF Login Page -->
                              <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27%3cactinic%3avariable%20name%3d%22Login%22%20%2f%3e%27" >
                              <img src="daisydaze_header.gif" width="762" height="125" border="0">
                              </actinic:block>
                              
                              
                              <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%27login%27" >
                              <Actinic:NOTINB2B>
                              <img src="daisydaze_header.gif" width="762" height="125" border="0">
                              </Actinic:NOTINB2B>
                              <Actinic:SHOWFORPRICESCHEDULE
                              Schedules="1,4"
                              HTML="&#60;img src=&#34;daisydaze_header.gif&#34; width=&#34;762&#34; height=&#34;125&#34; border=&#34;0&#34; &#62;"/>
                              </actinic:block>

                              Comment

                              Working...
                              X