Announcement

Collapse
No announcement yet.

Next and Prev in sub-sections?

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

    Next and Prev in sub-sections?

    Hi Chris...

    I have been trying the next and prev code for paging the products and it is hairy...

    I am using one product per page with thumbnails as sections (as Adv UG) therefore my paging is actually in the sub-sections of sections.

    I have had to make new Act_Primaries for Act_PrimaryWithNextPrev, Act_PrimaryWithNext and Act_PrimaryWithPrev in my sub-sections but I was wondering...

    I can get the first 16 to show, with a Next pointer but when I go to the Next section (17-32) it works fine but it shows my last product (s-xxx0016) for the previous section and I want it to show (1-16).

    It is working but how do I get to show my first 16 when I come into the section? Otherwise I will come into the section and only see 1-16, 17-32, 33-64 etc as products.

    I suppose I will have to hard code a 1-16 link back to the first page on each main section? Or use the words "next" and "prev" instead of the sub-section names?

    section: abstract
    . sub-section: s-abs0001
    . ....
    . sub-section: s-abs0016
    . sub-section: 17-32
    . sub-section: s-abs0017
    . ...
    . sub-section: s-abs0032
    . sub-section: 33-64
    . sub-section: s-abs0033
    . ...
    . sub-section: s-abs0064
    section: artists
    . sub-section: s-art0001
    . ....
    . sub-section: s-art0016
    . sub-section: 17-32
    . sub-section: s-art0017
    . ...
    . sub-section: s-art0032
    . sub-section: 33-64
    . sub-section: s-art0033
    . ...
    . sub-section: s-art0064
    etc......

    Any help greatly appreciated...

    Mike

    #2
    I suppose I will have to hard code a 1-16 link back to the first page on each main section? Or use the words "next" and "prev" instead of the sub-section names?
    First of all, well done on getting so far with the sub section links. I look forward to looking at yout site when it is all up and running.

    My suggestion for your store is to use custom property values for the 'Previous' and 'Next' section names.

    Create two custom properties in 'Advanced | Custom Properties' called 'PrevName' and 'NextName'.

    Then replace your prev/next link code in your overall layout templates with something like the following:

    Code:
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       <td><a href="NETQUOTEVAR:PREV_SECTION_URL">CUSTOMVAR:PREVNAME</a></td>
       <td align="right"><a href="NETQUOTEVAR:NEXT_SECTION_URL">CUSTOMVAR:NEXTNAME</a></td>
      </tr>
    </table>
    That way, on a section by section basis you can enter custom values for the custom properties that are appropriate. Do this within the 'Properties' tab of the sections.

    Comment


      #3
      Thanks Chris...

      I will use your suggestion and probably have to code some extra hard coded <TD>'s because the client wants pages show...

      i.e. <prev> 1,2,3,4,5 <next>

      Oh the fun of programming...

      Mike

      Comment


        #4
        Hi Chris...

        We have the site live now with the Next Prev implementation...

        You can see the live site at:

        http://www.artfactoryonline.com/

        DON'T FORGET IT IS LIVE !!!!!
        PAYMENTS ARE TAKEN AS VALID ORDERS !!!!!

        We are now integrating WorldPay which should be fun !!!!!

        Mike

        Comment


          #5
          Nice Site

          Hi Mike just had a quick look at your site and must say you have done a very nice job there

          Did you build this with Actinic Developer so you had the help of Dreamweaver or is this from templates in Catalog or Business?

          Good luck with the site

          Nick

          Comment


            #6
            Thanks Nick for your kind comments...

            Yup... I used Developer but I am from the "old-school" and still prefer to use a pure HTML editor, ColdFusion Studio (aka HomeSite+).

            Tweaked the templates quite a lot and used the help of Chris and Norman for the really tricky bits...

            Tested on a laptop with Apache, Perl and WarFTP off-line to make sure I didn't mess up the live site whilst testing. Swopping snapshots as required... You need two Network Setup settings though, one for "localsite" settings and one for "livesite" settings which can be imported when you have brought the snapshot into play...

            The people on the forums are really a great bunch and I am sure we all need advice from time to time... great job guys....

            Mike

            Comment


              #7
              Help I'm Drowning!

              O.K. This is exactly what I want achieve on my site, but I'm having trouble getting my head around the solution here.

              I've tried using the Next/previous code in my existing Act_Primary but it only seems to create links to my Sibling Sections. At the moment I have six sibling sections and have created one sub section called "page two" under a section called "Exclusives". This is just for testing, but I don't seem able to achieve a link to it.

              Can anyone explain how to use this code to link sub-sections without impacting on the sibling sections please?

              Would a different Act_primary for each of my sibling sections be the answer?

              Hope someone can advise.

              Myles Sinclair
              Last edited by magicalwonders; 11-Nov-2004, 05:25 PM. Reason: typo
              www.magicalwonders.com

              Comment


                #8
                Would a different Act_primary for each of my sibling sections be the answer?
                Simply answer to that is yes.

                You subsections would need to using a different act_primary template that had the next/previous code included - that way, you would only get these links between the subsections (or any other sections that use the amended act_primary template)

                Hoep that helps

                Comment


                  #9
                  Hi James,

                  Thanks for your input on this. I have tried creating Sibling sections using Act_Primary1 Act_Primary2 Act_primary3 etc., Having a different template for each section. So my first section using Act_primary1 will also use Act_primary1 for each of the subsections. Likewise My next section using Act_primary2 uses Act_primary two for any subsections.

                  This hasn't worked for me as the Code in AUG continues to link to the sibling sections and ignores the Subsections entirely.

                  If I've understood you correctly (remember I'm a complete duffer) my templates should be more like the following.

                  Act_Primary1 for main section, Act_Primary1A for subsection
                  Act_Primary2 for main section, Act_primary2A for subsection

                  I want to link to Subsections only and avoid links to Sibling sections, other than those in the existing Navigation.

                  Have I understood the method correctly?

                  Finally my apologies for starting a new thread in Forum 7 on this topic,
                  http://community.actinic.com/showthread.php?t=10658 I wasn't sure if I was going to get feedback.

                  Best wishes,

                  Myles
                  www.magicalwonders.com

                  Comment


                    #10
                    Hi Myles

                    Just to clarify - the code in the advanced users guide, allows you to create next/previous links between sections on the same level (siblings).

                    If you are wanting to link a section to a sub-section, then you can use a simple section link to take you onto the next section list - i.e. the next level of sections.

                    So, sections all at the same level would use the same amended act_primary template with the next/previous code in, so you can click next to go to the next section on that level.

                    Hope that helps

                    Comment


                      #11
                      Thanks James,

                      I'm sorry I'm being a complete dimbo on this one. As an example, this is what I want to do.

                      Say I have three sections called:

                      Vegetables:
                      Drinks:
                      Tinned Goods:

                      Each section has three subsections.

                      Vegetable: Root Veg / Organic / Exotic
                      Drinks: Soft Drinks / Alcohol / Mineral Waters
                      Tinned Goods: Fruit / Meat / pets

                      Vegetable, Drinks and Tinned goods are my sibbling sections. If I use the same template for each sibling section the Next/Previous code from the AUG will link Vegetable to Drinks to Tinned goods. Which I don't want to happen.

                      What I want to do is to Link Vegetable to Root veg, Root veg to organic and organic to Exotic, and back up the chain.

                      If you are wanting to link a section to a sub-section, then you can use a simple section link to take you onto the next section list - i.e. the next level of sections.
                      Yes, this is what I want to do. But now I'm confused as to how to set up the templates for this to work. Do I use say Act_Primary1 throughought the Vegetable Section and its subsections. Followed by ActPrimary2 for Drinks, soft Drinks, Alcohol etc., ?

                      Can you give me an example of a simple section link for say the Vegetable section so I can finally get my head around this?

                      Many thanks,

                      Myles
                      www.magicalwonders.com

                      Comment


                        #12
                        Hi Myles

                        What I want to do is to Link Vegetable to Root veg, Root veg to organic and organic to Exotic, and back up the chain.
                        The link from vegetable to root would be a simple section link...

                        The links between root, organic and exotic would be using the next/previous code.

                        The next/previous code does not work between top level sections and subsections (vegetable to root), you would just click through the section link to get to that level.

                        Hope that helps
                        ________

                        Comment


                          #13
                          Hi James,

                          I think I'm getting it!

                          Say I have three sections called:

                          Vegetables:
                          Drinks:
                          Tinned Goods:

                          Each section has three subsections.

                          Vegetable: Root Veg / Organic / Exotic
                          Drinks: Soft Drinks / Alcohol / Mineral Waters
                          Tinned Goods: Fruit / Meat / pets
                          S I could use the Same Act_Primary to create my sibbling sections. Vegetable, Drinks, and Tinned Goods. Then a separate modified Act_Primary for each section containing Next/Previous code to create the sub-Sections.

                          Then create a link like this in each sibling section,

                          <a href="RootvegPage2">Next Page</a>
                          <a href="SoftdrinksPage2>Next Page</a>

                          If I then use modified Act_Primary (containing Next/Previous code) to create all the subsections, my links to the subsections within each Sibling (Top) section will automatically be created?

                          So I would have Act_primary1 for all the subsections under "Vegetable"
                          and Act-Primary2 for all the subsections under Drinks, and so on.

                          Have I got it?

                          Best wishes,

                          Myles
                          www.magicalwonders.com

                          Comment


                            #14
                            That does sound about right, basically siblings would use one act_primary, and subsections would use the modified act_primary.

                            And then, as you said, create a link in each of your sibling sections to the relevant subsections.

                            Comment


                              #15
                              Hi James,

                              Thanks for your help on this. I'll give it a go over the next few days and report back on how I get on.

                              Many thanks,

                              Myles
                              www.magicalwonders.com

                              Comment

                              Working...
                              X