Announcement

Collapse
No announcement yet.

Link to specific product from root

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

    #16
    Originally posted by leehack
    You trying to say i'm a bodger Bumpsy?
    I'm deeply hurt.
    much as I know you are joking, most certainly no, far from it!
    but you knew that anyway
    Tracey

    Comment


      #17
      Originally posted by leehack
      Tell us the product you are trying to link to and we can test a URL in here.
      Give us the prod ref and the url it sits on, this should be really easy to do.
      OK then:

      Home page: http://www.rainbowfloristsupplies.co.uk - we're talking about the right hand panel 'Valentine Bears'.

      At present the top picture is linked straight to the relevant page, i.e. no product reference included, as the item is at the top of the page anyway. That one works fine.

      The other two pictures have the inoperative links - they do not work because "acatalog/" is not included in the url. We are trying to get "acatalog/" inserted automatically, see below, from a text file customvar.

      The page that it should link to is http://www.rainbowfloristsupplies.co.../ValBears.html where these products are listed. Each product displayed here is a duplicate product.

      The second picture in the panel is a Harvey Bear - this is the fourth product down on the page and it's Product Reference is VB531, or in this case, 1!VB531 as it's a duplicate.

      This is the content of the current text file:

      HTML Code:
      <P ALIGN="CENTER">
      <A HREF='ValBears.html'><IMG SRC="0_RM1.jpg" border=0 alt="Georgie Bear"><br>Georgie Bear</A><BR>
      </P>
      <P ALIGN="CENTER">
      <A HREF="ValBears.html#a1_21VB531"><IMG SRC="0_RM2.jpg" border=0 alt="Harvey Bear"><br>Harvey Bear</A><BR>
      </P>
      <P ALIGN="CENTER">
      <A HREF="ValBears.html#a1_21VB541"><IMG SRC="0_RM3.jpg" border=0 alt="Barney Bear"><br>Barney Bear</A><BR>
      </P>
      The use of either single or double quotes has not made any difference, and note that all links translate correctly except the ones with ProdRefs.

      Please note we are talking about the Home Page only, it all works fine from within the catalog.

      Also, it does of course work if I use the full url:

      HTML Code:
      <A HREF="http://www.rainbowfloristsupplies.co.uk/acatalog/ValBears.html#a1_21VB531">
      To summarise the objective:

      HTML Code:
      <A HREF="ValBears.html">
      translates automatically to become
      HTML Code:
      <A HREF="acatalog/ValBears.html">
      however
      HTML Code:
      <A HREF="ValBears.html#a1_21VB531">
      does not translate automatically.

      Good luck - don't stay up too late!

      (Please note the page 'ValBears.html' will self-destruct on 13th February......)
      .
      Paul
      Flower-Stands.co.uk - the UK's largest online supplier of Fresh Flower Merchandising Stands

      Using V10.2 with Norman's brilliantly simple TABBER.

      Comment


        #18
        I've just put this live on one of my test sites and it worked first time?

        Code:
        <a href="http://www.rainbowfloristsupplies.co.uk/acatalog/ValBears.html#a1_21VB531">link</a>
        Did you forget to close the <a> tag with the link text?

        example

        Comment


          #19
          Originally posted by leehack
          I've just put this live on one of my test sites and it worked first time?
          Well it would, wouldn't it, but that's not the point, or the problem we are investigating.

          The problem is valid, but it's not critical so perhaps we should all stop worrying about it.


          Originally posted by leehack
          Did you forget to close the <a> tag with the link text?
          Please refer to my html code extract above, where you will see closing tags.

          Paul
          Paul
          Flower-Stands.co.uk - the UK's largest online supplier of Fresh Flower Merchandising Stands

          Using V10.2 with Norman's brilliantly simple TABBER.

          Comment


            #20
            I'm lost on what you are trying to do and what issues you have with a full URL, when this is in fact often a recommended thing to do.

            If you are misunderstanding why a link on your home page, forms differently to a product page, then look no further than the base HREF, it is different for both pages and therefore any links which are sitewide, HAVE to be full URL or they will fail at root level. You simply cannot have relative links if it is a site wide item and your shop also sits at different levels.

            Comment


              #21
              I gave up too..
              Tracey

              Comment


                #22
                OK one last time then we give up, alright?

                In Design | Options | Site Defaults there is a panel of 'Properties'.

                Amongst these can be RIGHTBARTITLE and RIGHTBARTEXT.

                Alongside RIGHTBARTEXT you can have 'Value=textfile.txt' then checkbox 'Use as Customvar' then checkbox 'Filename' then checkbox 'Use File Content'.

                NEXT

                In Act_BrochurePrimary.html and in Act_Primary.html (and other pages where necessary) the html code for the 'RIGHTBAR' contains the code
                HTML Code:
                               <tr> 
                                <td valign="top"><br>CUSTOMVAR:RIGHTBARTEXT<br><br></td>
                               </tr>
                and anywhere that this appears on the site (i.e. every page) the content of 'textfile.txt' is displayed. This is very useful for quickly changing the content of the RIGHTBAR site-wide, universally and consistently.

                (The alternative being to edit each necessary template individually, with the possible risk of mucking one of them up.)

                Now, when you enter a relative url in textfile.txt, for example:

                HTML Code:
                <A HREF="ValBears.html"> link text here </a>
                on uploading the site every page in 'acatalog' contains the link to an object that resides at the same level on the server.

                However, somewhere behind the scenes, Actinic, for the purposes of using this text file on the Home Page 'index.html', inserts 'acatalog/' in front of it.

                So at the risk of repeating myself,
                HTML Code:
                <A HREF="ValBears.html"> link text here </a>
                AUTOMATICALLY TRANSLATES TO
                HTML Code:
                <A HREF="acatalog/ValBears.html"> link text here </a>
                for use on the Home Page.

                It doesn't matter whether your using an HREF= or an IMG SRC=, it just does it.

                BUT IF YOU ADD A PRODUCT REFERENCE to the end of the relative url, it does not do the translation.

                Therefore, it seems that you can't use a relative url, in a text file, used as a CUSTOMVAR, with a ProductReference appended.

                As I have said, this is by no means critical, I don't have to have it, but having got this far we're trying to find out (a) why does it not work? and (b) is there a fix?

                Right then, ISSUES:

                1) I seem to remember from ages ago that if I use a full url in a sidebar, and a logged-in customer clicks on the link, it APPEARS to log them out. I don't think it actually does, but the Welcome message disappears so they think they are.

                2) OK, I know that the correct javascript method using NOLOGIN=1 does not do this. But javascript links are apparently not search-engine friendly (not that my site gets found very well anyway, I don't have time to do any optimisation, that I don't fully understand anyway).

                3) Hence trying to use relative links - which work absolutely fine - unless you try to add a Product Reference.

                No matter.

                Originally posted by budgetbumps
                I gave up too..
                Dear Tracey, we got in a muddle, we barked up the wrong tree, confusion reigned - be a love & pour me a vodka, what a day!

                Paul
                Paul
                Flower-Stands.co.uk - the UK's largest online supplier of Fresh Flower Merchandising Stands

                Using V10.2 with Norman's brilliantly simple TABBER.

                Comment


                  #23
                  Right i think i understand now. When you add a relative url into the text file which has an anchor after it, it does not form the url correctly. However when the anchor is not there, it forms as you would want it to. Therefore, i would assume that on doing the conversion for you, actinic is looking for either .html or .htm at the end of a url, if it can't find it, it does nothing and it defaults to the base href, which has no acatalog at root level.

                  You can't use full URL as there is an apparent LOGIN issue.

                  You don't like Javascript links as they are not SEO friendly.

                  So you are stuffed basically.

                  I do have a few points to make though. You do not like Javascript links, yet your main site navigation uses this method, why is one product in the sidebar using this method so bad, but the principal site nav is not an issue. If you cannot get this to work, it is much better to have a cgi link direct to the product, than one that just takes you to the page. If you can't please search engines, then at least help your visitors etc.

                  Comment


                    #24
                    Paul - I don't believe you'll get any further with this or that it may be worth the effort, although I agree it is frustrating - I think you have uncovered a bug.
                    Fix - Unfortunately I doubt it will happen because the development focus is now on v8 and v9.
                    Workaround - as mentioned, don't use relative URLs in the text file, and if you have login customers then use cgi-links - yes they may not be SEO friendly but they won't frighten your customers away by making then think they've logged out.

                    Now, put your feet up, have a nice sip of your vodka and orange and think of what else you can do with the same amount of brainpower that will help better the SEO on your site. LOL

                    Comment


                      #25
                      Well I was about to go home....

                      Reply to Lee:

                      Looking for '.html' - ah, that would explain it. Thanks.

                      Stuffed yes, reached that conclusion many posts back & lost count of the number of times I've suggested giving up!

                      My site navigation uses javascript links - I know, it is on my list to hard-code these. When I do it, I will do it using a textfile as a CUSTOMVAR for reasons previously stated, it that's alright with you. I will use relative links and Actinic will form the links correctly for use on the Home Page, I will then be able to make changes easily.

                      But with pressures of work and the complexity of the task means I keep putting it off.

                      Reply to Duncan:

                      Thanks for reading this far!

                      BTW you say DON'T use relative urls in the text file, but THEY don't cause the problem - it's full urls that do. So I beg to differ, see above, that'll work won't it?

                      (Got a couple of minor issues with our last project, will be in touch soon!)

                      Thanks to all participants, Paul
                      Paul
                      Flower-Stands.co.uk - the UK's largest online supplier of Fresh Flower Merchandising Stands

                      Using V10.2 with Norman's brilliantly simple TABBER.

                      Comment


                        #26
                        This minor problem is still there V8, I'm afraid.

                        You could use a hack like
                        Code:
                        <a href="mypage.html" onclick="location.href=this.href+'#prodref';return false;">Click me</a>
                        But I see no reason not to use fully formed URL's instead.
                        Norman - www.drillpine.biz
                        Edinburgh, U K / Bitez, Turkey

                        Comment


                          #27
                          You read it all too!

                          Meaning insert the actual Product Reference where you have put '#prodref'?

                          Including the ! character or using '_21'?
                          Paul
                          Flower-Stands.co.uk - the UK's largest online supplier of Fresh Flower Merchandising Stands

                          Using V10.2 with Norman's brilliantly simple TABBER.

                          Comment


                            #28
                            The '#prodref' bit should be '#anchor' which is a<prodref> but you have to escape the product reference special characters.

                            However since we're using JavaScript lets get the JS to do it for us:
                            Code:
                            <a href="mypage.html" onclick="location.href=this.href+'#a'+escape('AB/C-12').replace(/%/g,'_');return false;">Click me</a>
                            Now that AB/C-12 bit is our normal product reference and the JavaScript generates all the underline stuff and prepends the #a as well. All you need to supply is the normal product reference.
                            Norman - www.drillpine.biz
                            Edinburgh, U K / Bitez, Turkey

                            Comment


                              #29
                              Finally, if you're linking to a Duplicate you have to prepend n! to the reference where n depends on whether it's the 1st, 2nd, Duplicate, etc.
                              Norman - www.drillpine.biz
                              Edinburgh, U K / Bitez, Turkey

                              Comment


                                #30
                                Problem Solved


                                Many thanks Norman, you have done it again, works a treat!


                                In the unlikely event of anyone else searching for the answer here's the summary, and this should work in V8 & probably V9 as well:

                                The link in the text file should read
                                HTML Code:
                                <a href="PRODUCT_PAGE.html" onclick="location.href=this.href+'#a'+escape('PRODUCT_REFERENCE').replace(/%/g,'_');return false;">CLICK HERE</a>
                                Where:

                                PRODUCT_PAGE should be replaced by the name of the page containing the product to be linked to;

                                PRODUCT_REFERENCE should be the reference for the particular product on that page.

                                With the proviso that if the product is a duplicate the PRODUCT_REFERENCE should be preceeded by n! where n is replaced by the number of the duplicate, for example first duplicate of PROD1 becomes 1!PROD1.

                                CLICK HERE can be either a text phrase OR replaced by <IMG SRC="image.jpg">

                                End of thread I think.
                                Paul
                                Flower-Stands.co.uk - the UK's largest online supplier of Fresh Flower Merchandising Stands

                                Using V10.2 with Norman's brilliantly simple TABBER.

                                Comment

                                Working...
                                X