Announcement

Collapse
No announcement yet.

Jump to fragment navigation within a page

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

    Jump to fragment navigation within a page

    Right, another idea of mine... Couldn't find anything about this on the site already.

    What I want to achieve is: within a section or subsection i.e. Batteries there are multiple different types (AAA,AA,C, etc) and if the products are organised into sections I would like to have a fragment at the beginning of each section which I can link to.
    Then at the top of the page I would have a section saying 'Jump to: AAA - AA - C' etc.

    What I was thinking is create two new variables (or possibly one variable one condition...) for fragments:
    - one would be an anchor reference
    - the second would be 'include in jump to'

    I could create a layout for the fragment which was 'jumptofragment' and this would have the fragment header set out with the anchor around it. That's fine.

    The top of the page however...
    I would have a layout and it would be Jump to:
    But then I'd need it to list all of the <a href="#"Actinicvariable...>Actinicvariable2</a> for the fragments on that page (and that page only) for which the variable/condition 'include in jump to' is set to yes...

    And I have no idea how to do that second part.

    If anyone has any ideas for this, or a completely different method that achieves the same outcome I'd be very happy. =)

    #2
    Won't the Section Link Layout do exactly what you want as standard?

    Comment


      #3
      But it's not sections that I want to link to. Because that would require additional pages. I want to link to fragments within a page.

      Unless you mean like the site map section link...
      Do I just use <li> ?

      Code:
      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsSectionIncludedInSiteMap%22%20%2f%3e" >
         <li style="margin-left: <actinic:variable name="SectionLevel" />em;">
         <a href='<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>'>
            <Actinic:Variable Name="SectionName">
         </a>
         </li>
      </actinic:block>
      So instead of that I'd have something like if it is included in jump to, then list the links.

      But how would i ensure it only links to the fragments on that page?

      Comment


        #4
        Insert:

        !!<<a name="blah"></a>>!!

        into the fragment title or body text of the fragment you want to link to and then link to that anchor as you wish.

        Comment


          #5
          Yeah but then I have to manually add that in to every single anchor (not too bad) but then I also have to do that for every single header fragment as well. Take the batteries page. That would have 6 different type of batteries on it. So that's already a fair about of work for just that one page.

          How do the subsection links work in only showing the subsections from that page? because that's what I want, but with fragments that are set to be included.

          Comment


            #6
            I'm completely lost trying to understand what you are trying, i'll step aside to avoid any further confusion. In 7 years as a designer i've never heard of someone needing anything like this and i'm struggling to understand why you do.

            Sections are links, you click the link, you go to the page, nothing more complicated than that. Perhaps you need to show a visual idea of what you are trying.

            Comment


              #7
              Currently what we have is the site structure so for instance this page is under
              Batteries>Holders
              In that page I have 23 products which could be further categorised under AA, AAA etc, but I don't really want to have another 6 pages which each have 2 or 3 products on them, so what I wanted to do was have hyperlinks to a fragment, so you could jump to AA but then you'd be able to still scroll up and down to see AAA etc.

              The more difficult part is that I want to have a jump to: section at the top of the page.

              Hmm here's a bad paint image of what I want.
              For every fragment which has an anchor defined, I want it linked to in a fragment at the top of the page.
              Attached Files

              Comment


                #8
                Actinic provides each item on a page with a listindex, first item is 1, second is 2 etc. It can have problems in certain situations, but largely works ok. This is the only real way of getting something automatically annotated on the page, so you do not have to get involved. For instance in your fragment layout you could have (pseudo code):

                <a name="anchor<listIndex>"></a>

                which would give you anchor1, anchor2 etc. with the layouts. You could perhaps have some auto nav link to those anchors automatically, but you would still need to name them in the nav.

                Actinic provides a block for both entiresectionlist and childsectionlist, there may be some mileage in that, depends on your section structure and whether each product is SPP or extended info pages.

                Even if you use fragment name as the anchor, replacing spaces with an _, you will still need to name the nav items.

                I can't see an auto solution for this, not entirely auto anyway, can you provide a screenshot of your content tree expanded for the section in question.

                Comment


                  #9
                  Yeah well the naming the anchors wouldn't be so bad. I can handle that.
                  It's more it getting them to display them. I was thinking along the lines of the brochure fragment list. But I can't seem to get it to work...

                  Actinic automatically gives the fragments anchors under the variable FragmentAnchor, but they are randomly assigned i.e. a40004 was one.

                  I'll have another look when i'm back on my computer properly.

                  Thanks for your help so far, it's atleast giving me lots to think about.

                  Comment


                    #10
                    Remember that fragments in a section are processed by the product list, not a fragment list, actinic treats fragments in a section as though they are products, it just has a product type variable to differentiate between them.

                    Comment

                    Working...
                    X