Announcement

Collapse
No announcement yet.

Condition page url is

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

    Condition page url is

    Is there or can I make a condition of 'page url is' ?
    I need to hard code some custom searches and have a relevant title above the results
    The block if would be something like
    Code:
    If PageURL = www.blogsandco.com/cgi-bin/ss000001.cgi?RANDOM=NETQUOTEVAR%3ARANDOM&PAGE=SEARCH&SS=&TB=A&PR=-1&S_Brand0_0=Black&S_Colour0_1=&GB=A&ACTION=Search
    Then display this: Brands Black.

    I tried Mike Hughes mod on
    HTML Code:
    http://community.actinic.com/showthread.php?t=40343
    But it didn't seem to work with Norman's multi column SearchScript.pl

    It is possible that none of this makes sense! If not please say and will try again!

    Thanks
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    Blockifs only run on the desktop, not online, so no URL like that will work in a blockif. Create a variable, define a value on any given page and then use a blockif to ascertain whether you are on that page, if so, then show your different content.

    Comment


      #3
      In the absence of blockifs you could use Javascript also to check the url that page is currently on and return text.
      Peblaco

      Comment


        #4
        Thank you Louise and Lee. The pages I want to identify are dynamic.
        The deal is this:
        Client manages his products (patterns) by ref number not by type/style.
        Customers chose patterns by type/style not number.
        I make a variable for pattern type for each product which the client completes as he turns over his product range.
        I define the variable as a searchable property.
        I make a hard coded table of images and links for styles (trousers, skirt, etc etc) using the search url for each type/style of pattern.
        I use Norman's multi column search results page to make a nice display.
        It would be nice to have a page heading "Trousers" or "Skirts" for each of these dynamically generated pages.

        BTW - Here is some javascript that does what Louise suggested for any other searchers:
        Code:
        <SCRIPT LANGUAGE="JavaScript">
          
              <!--
              {
               document.write(location.href);
              }
              // -->
        </SCRIPT>
        Code:
        <SCRIPT LANGUAGE="JavaScript">
          
              <!--
              document.write('<A HREF="' + location.href +'">');
              document.write(location.href);
              document.write('</A>');
              // -->
        </SCRIPT>
        Thanks
        Jonathan Chappell
        Website Designer
        SellerDeck Website Designer
        Actinic to SellerDeck upgrades
        Graphicz Limited - www.graphicz.co.uk

        Comment


          #5
          Write page content depending on search results URL

          I have now worked out how to write page content depending on search results URL.

          If you go to http://www.graphicz.eu.com/site1/ and do a Search by Colour say Red, the resulting long URL will contain the phrase Colour0_0=Red. The long search results URL can change with subsequent searched but Colour0_0=Red stays constant.

          We can now use some Javascript as follows:

          In the <head> section add this:
          Code:
          <SCRIPT LANGUAGE="JavaScript">
          <!-- Begin
          URL = window.location.href;
          isblack = (URL.indexOf('Colour0_0=Black') > -1);
          isblue = (URL.indexOf('Colour0_0=Dark+Blue') > -1); 
          //  End -->
          </script>
          In the Search Results Page Bulk Area add this where you want the text to appear:
          Code:
          <SCRIPT LANGUAGE="JavaScript">
          if (isblack) {
          document.write("<h2>This is black!</h2>");
          }
          else if (isblue) {
          document.write("<h2>This is blue!</h2>");
          }  
          </script>
          This results in an H2 heading when you search for black or dark blue. (Try on the site above.)

          It may be possible to use Actinic variables, if someone develops this idea please post it here!

          Thanks
          Jonathan Chappell
          Website Designer
          SellerDeck Website Designer
          Actinic to SellerDeck upgrades
          Graphicz Limited - www.graphicz.co.uk

          Comment

          Working...
          X