Announcement

Collapse
No announcement yet.

Linking to brochure fragments

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

    Linking to brochure fragments

    I'm trying to link to multiple brochure fragments (which appear on the same brochure page) from product pages.

    I've created anchors in the fragments layout by using

    <a name="<actinic:variable Name="FragmentTitle"/>"</a>

    and that seems to work, but i'm having difficulty linking to them.

    e.g. i have a fragment title: Pit of Shame
    on brochure page: Reviews.html
    and I've tried the links: Reviews.html#aPit of Shame, Reviews.html#aPit_of_Shame and a couple of other variations which i can't even remember now...and i'm still tearing my hair out.

    I'm learning as i go with this, and i've searched and searched the forums. Can anybody tell me what is wrong with my link and how to achieve the link i'm after?

    yours,

    Balding Quickly

    #2
    this thread should help.
    you need to change the spaces in the fragment name.
    Tracey

    Comment


      #3
      If that is a copy and paste of the code, you are missing a closing brace before the closing tag

      >"></a>

      This page may help you http://www.w3.org/TR/html4/struct/links.html
      Bill
      www.egyptianwonders.co.uk
      Text directoryWorldwide Actinic(TM) shops
      BC Ness Solutions Support services, custom software
      Registered Microsoft™ Partner (ISV)
      VoIP UK: 0131 208 0605
      Located: Alexandria, EGYPT

      Comment


        #4
        ...all very good advice, but even after making those changes I still cannot link to my anchor!!

        Perhaps i'm doing something wrong while trying to anchor the Fragment Title? Could someone have a look at my fragment layout code - the bit i've added is in red:

        Code:
        <actinic:block if="%3cactinic%3avariable%20name%3d%22FragmentImageFileName%22%20%2f%3e%20%21%3d%20%22%22">
           	
        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsFragmentImageALink%22%20%2f%3e" >
           <actinic:block if="%3cactinic%3avariable%20name%3d%22IsFragmentLinkToURL%22%20%2f%3e" >
              <a href="<actinic:variable name="FragmentLinkedItemID" />">
           </actinic:block>
           <actinic:block if="%3cactinic%3avariable%20name%3d%22IsFragmentLinkToProduct%22%20%2f%3e" >
              <a href="<Actinic:Variable Name="SearchCGIURL"/>?PRODREF=<actinic:variable name="FragmentLinkedItemID" /><actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">&amp;SHOP=<Actinic:Variable Name="ShopID"/></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e">&amp;NOLOGIN=1</actinic:block>">
           </actinic:block>
           <actinic:block if="%3cactinic%3avariable%20name%3d%22IsFragmentLinkToSection%22%20%2f%3e" >
              <a href="<Actinic:Variable Name="SearchCGIURL"/>?SECTIONID=<actinic:variable name="FragmentLinkedItemID" /><actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">&amp;SHOP=<Actinic:Variable Name="ShopID"/></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e">&amp;NOLOGIN=1</actinic:block>">
           </actinic:block>
        </actinic:block>
        <img src="<actinic:variable name="FragmentImageFileName" />"
           alt="<actinic:variable name="FragmentTitle" encoding="strip" />"
           border="1"
           width="<actinic:variable name="FragmentImageWidth" />"
           height="<actinic:variable name="FragmentImageHeight" />"
           class="image_float_right" />
        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsFragmentImageALink%22%20%2f%3e" >
           </a>
        </actinic:block>
        
           	</actinic:block>
        
        <actinic:block if="%3cactinic%3avariable%20name%3d%22FragmentAnchor%22%20%2f%3e%20!=%20%22%22">
        <a name="<actinic:variable name='FragmentAnchor'/>"></a>
        </actinic:block> 
        		<a name="<actinic:variable name='FragmentTitle'/>"></a>
        		<h1 class="subheading"><actinic:variable Name="FragmentTitle"/></h1>
        		<p><actinic:variable Name="FragmentText"/></p>

        The links from product full description which i've tried are:

        Code:
        !!<<a href="Reviews.html#aPit_20of_20Shame">Reviews</a>>!!
        !!<<a href="Reviews.html#aPit_of_Shame">Reviews</a>>!!
        !!<<a href="Reviews.html#aPit of Shame">Reviews</a>>!!
        !!<<a href="Reviews.html#aPit%20of%20Shame">Reviews</a>>!!
        and
        !!<<a href="Reviews.html#atest">Reviews</a>>!!
        'test' and 'Pit of Shame' are the fragment titles i'm using (upper/lower cases are correct)

        At the moment these just link to the top of Reviews.html, not my fragments which ARE part of it.

        Comment


          #5
          Try it without any spaces in the fragment title, see if that solves it for you.

          Comment


            #6
            that was the point of the 'test' fragment...it doesn't solve it

            Comment


              #7
              If it is in one complete word and the case is correct, then it works as this is almost identical to what i am doing on a site build at the moment.

              Have you remembered to use the '#'?

              Show me the Fragment Title and show me the anchor pointing to it.

              Comment


                #8
                an url might be helpful.

                Comment


                  #9
                  Gabriel the URL is:

                  http://support.actinic.co.uk/~tbsupp...ews.html#atest

                  Lee, as you can see in the above link I've included the '#' and the 'a'. The fragment title is test all lower case, as in the URL. I've checked the source of the page, and the anchor is being created: <a name="test"></a> but for some reason my link to it doesn't work.

                  thank you both for looking into this at beer o'clock on a friday

                  Comment


                    #10
                    Alex

                    Im just off out, i haven't got time to decipher for you, but take a look what i am doing on my test site to see it in action. Hover over and then click the link in the table with grey headings. You will see the idea then.

                    Will catch back up later with it, if still no joy.

                    Comment


                      #11
                      Half a result

                      By looking at your site Lee, i've realised i don't need the 'a' in the link before the fragment title i.e. ../Result.html#test works ../Result.html#atest was wrong. Thanks

                      However

                      I still have a problem with FragmentTitle variables where there are spaces between words, something which i can't change. According to [information in links provided in] earlier posts in this thread i need to replace those spaces with either _20 or %20 but i have tried both and neither does the job.

                      Comment


                        #12
                        That is also something i am yet to solve, will let you know if i do.

                        Comment


                          #13
                          To Add Anchors To Fragments

                          One option is to put some simple php in to parse the FragmentTitle variable to replace spaces with underscores or similar.

                          To add anchors to the fragments add this into the fragment layout above the fragment title heading:
                          Code:
                          <a name="<actinic:block php="true" >
                          $sFragTitle = '<actinic:variable Name="FragmentTitle"/>';
                          $sSpacerChar = '_'; 
                          $sFragTitle = str_replace (" ", $sSpacerChar, $sFragTitle); 
                          echo $sFragTitle;
                          </actinic:block>"></a>
                          So for a fragment titled 'The Fragment Title' link to it with:
                          Code:
                          !!<<a href="PageName.html#The_Fragment_Title">Link Text</a>>!!
                          Also if the fragment is on a product page then you can link to it directly anyway by setting an advanced link to product and then selecting the fragment in the list. I think that makes use of this:
                          <a name="<actinic:variable name='FragmentAnchor' />"></a>
                          which is in the standard css fragment layout.

                          (Problem with this is that sometimes the fragment appears to just show up as a blank in the slection list rather than by name - buglet perhaps)

                          Comment


                            #14
                            Yes!!

                            That works - thank you so much.

                            Comment

                            Working...
                            X