Announcement

Collapse
No announcement yet.

product link text

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

    product link text

    In an ideal world I would like the option of having a small description of each product (with a list of say 10 - 15 products per page) which when you "click here" link you go to a full page about that the product. As I am convinced you can't do this (PLEASE TELL ME IM WRONG), instead I would like to do this:

    I have set up link in the product link text running to a cgi bin which tells it which image to open in the larger version. Great.

    But how the hell do I set the template for the PRODUCT LINK TEXT to open in a blank page. The most simplist of html code known to man! ARGGGHHH

    Its probably very simple but this has pushed me over the edge of probably never using this software again...

    product link text

    #2
    Even though you were quite rude I've decided to answer your post.

    If you go into Design / Text / HTML and look at around the 13th item from the top you'll see the line:-

    <A HREF="%s">

    if you replace this with ( single line):-

    <A HREF="javascript:window.open('%s', 'ActPopup', 'width=800,height=600,scrollbars,resizable')">

    Then that will open all links in a new window. You can tinker with the width=... bit to add whatever parameters you require.


    Norman

    p.s. By the way all this is built in to V6.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thank you. I didn't mean to sound so rude. I've kind of lost the plot with this project!

      Can you recommend any resource for this kind of trickery (Actinic related not plain Javascript)?

      Thank you again.

      Designcurb

      (Not a very good start to my forum debut)

      Comment


        #4
        Hi Norman

        Read with interest your reply as I'm dealing with more or less the same issue. If I understand correctly altering the <A HREF="%s"> would affect ALL product information link URLs in Actinic and not just those generated from a specific template? My problem is that we have some products where extra information is best displayed in a pop-up and others where we use full screen pages. Obviously I need to be able to make the change on the template and not in the global actinic settings. Any ideas? Beside getting v6 that is.

        yvonne
        Hidden Valley Hibiscus

        Comment


          #5
          Yvonne,

          Since the HREF fires of some JavaScript you now have a lot of control. It can be extended to examine the passed in URL and decide if it wants to call the usual popup code or open a new window. I.e. If the URL contains 'NW' force a new window.

          If you're not up the JavaScript let me know and I'll have a go.

          Norman
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            PRODUCTBEGINLINK

            Hi Norman

            Thanks for offering to help out. Much appreciated and for what you suggest necessary as I'm just a simple script hack!

            As I was (still is) pressed for time I did a search on the old forum and came up with Tim Weaver's old pop-up script which is different from what I'm used to. I saw that what was needed to slip this script into the URL was to get rid of the closing tag so I tried that and it worked. Here's how I worked it:

            1. Go to Design/Text/Advanced Language/HTML and change <A HREF="%s"> to <A HREF="%s"

            2. Add the closing tag to all product templates like so: NETQUOTEVAR:PRODUCTBEGINLINK>NETQUOTEVAR:PRODUCTLINKTEXTNETQUOTEVAR:PRODUCTENDLINK

            3. On the template for sections where I wish pop-ups insert the following code between PRODUCTBEGINLINK and >
            onclick="javascript:window.open(this.href,'moredetails','width=400,height=450
            0,top=0,left=0,scrollbars=yes,resizable=yes');return false;"

            So far the only drawback is a small > on products which has no link but I believe I can live with that! See Aluminum Tag as to what it looks like. Also the javaScript code does show if there's no product link when using the template that holds the pop-up code. As all products I use that template for has a link that's supposed to open in a pop-up it's not an issue for me.

            Not as elegant as your solution Norman but at least I made it work!

            yvonne
            Hidden Valley Hibiscus

            Comment


              #7
              Yvonne,

              Here's a merger of Tims way and mine that does everything with the minimum of tinkering and no side effects.

              If you go into Design / Text / HTML and look at around the 13th item from the top you'll see the line:-

              Code:
              <A HREF="%s"> 
              
              if you replace this with (single line):- 
              
              <A HREF="%s" onclick="javascript:if (this.href.indexOf('_nw') != -1){window.open(this.href, 'ActPopup', 'width=800,height=600,scrollbars,resizable');return false;}">
              
              Then this will act as usual, loading the page into the current
              window unless the Links address or the filename contains the
              string _nw (think New Window - the _nw can be anywhere in the
              text).  If the _nw exists then a popup window is opened instead.
              
              (e.g. http://mysite.co.uk/page_nw.html will pop up a new window and
              http://mysite.co.uk/pagebig.html won't.
              
              Now that's fine for your own files or pages where you can choose
              the name but what if you want to access someone elses where
              you have no control over the URL.
              Simple.  Just add a parameter to the url.   E.g.
              
              http://www.snowlines.co.uk will take you there as usual and
              http://www.snowlines.co.uk?_nw will load it into a pop up window.
              
              You might want to use this way for your own pages as well.
              The forum is sticking a space into java script above. It should be javascript

              Norman
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Hi Norman

                Thank you so much for the code! I'm going to switch over to it as soon as I have time to change all the page names. Piece of cake as there are just a few hundreds of them! But I'm preparing myself and will add the string element to the NEW pop-up pages I'm making so I don't have to redo them when ready for the switch.

                Btw, I think it silly that the forum won't let one write javascript as one word. Why not, Chris? Obviously many people will post javascript code to these forums! We shouldn't have to always write the disclaimer.

                yvonne
                Hidden Valley Hibiscus

                Comment


                  #9
                  Yvonne,

                  You're welcome.

                  I try to create solutions that extend Actinic. I.e. everything works as before unless you activate it by a tiny tweak in the way you do things.

                  Did you see my one for multiple Other Info Prompts? If the Other Info Prompt contains "|" characters then it splits into lots of smaller prompts e.g. Age|Weight|Height and otherwise works as normal.

                  I guess the munging of Java Script is to prevent hackers trying to put something nasty onto the forum. I've seen posts in other forums and guestbooks where twats have tried to break things (and succeeded) by doing just that. It does seem a bit pointless as if you don't have the "language=..." attribute most systems presume JavaScript anyway.

                  The real pain is that with some things it does the reverse and lets them through. Try try to include an html character entity like "ampersand nbsp semicolon" even inside CODE tags and it still gets displayed as the actual character rather than showing the tag as typed.

                  Norman
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    I just found this in the Knowledge Base. It's a really simple way of doing it (but you don't get any control over the size of the new page):-


                    How can I make the Product Information Link open in a new window?
                    Solution: This can be achieved by modifying the Product Templates.

                    You may want to make new versions of the templates if you intend to retain the normal operation for some products.

                    - Edit the appropriate product template in the site folder with a text editor such as Notepad.
                    - Locate and replace each occurrence of:

                    <br>NETQUOTEVAR:PRODUCTBEGINLINK
                    NETQUOTEVAR:PRODUCTLINKTEXT
                    NETQUOTEVAR:PRODUCTENDLINK

                    - With:

                    <BASE TARGET="_blank">
                    <br>NETQUOTEVAR:PRODUCTBEGINLINK
                    NETQUOTEVAR:PRODUCTLINKTEXT
                    NETQUOTEVAR:PRODUCTENDLINK
                    <BASE TARGET="_self">

                    - Save the changes and update the web site.

                    This has the effect of switching the target for just the information link, and resetting it for other links. When there is no information link, the tags have no resultant effect on the page.
                    Norman - www.drillpine.biz
                    Edinburgh, U K / Bitez, Turkey

                    Comment

                    Working...
                    X