Announcement

Collapse
No announcement yet.

Changing the Primary template on hundereds of subsections...

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

    Changing the Primary template on hundereds of subsections...

    I have a top level section, with maybe 100 or so subsections. Currently all the subsections have the 'overall layout' set to 'use parent'.

    The problem is I want to change the parent to have a unique layout. This is technically possible - just change each of the subsections from 'use parent' to a specific template that is different to the parent.

    But my actinic DB is so big that just selecting a record takes several seconds, and updating the field another several seconds - so just going down the list one by one pasting a new section name into each of the subsections would be painfully slow.

    So what is the easiest way to change the overall layout template on lots of subsections? (I suspect the answer may involve access, so specific instructions may be required as it's a pain the @$$ to use)
    John

    #2
    What are you doing differently on the parent then, is it a drastic change? You could leave all as it is and apply a section level variable (a yes/no dropdown for example), which when selected to yes (at section level), reflected your change in the section layout, if not then it left it as it is.

    In the layout (in plain English), you would have:

    /Blockif (Is the variable selected as "yes")
    Change the colour to red then and add a bit of padding
    /Block

    The bit in the middle (red stuff) gets actioned if the variable is yes, so if the variable has 'no' as standard, the above is just ignored. That can be used cleverly to actually have one layout, but use it differently.

    You can take this theory a step further and get a whole load of blockifs testing conditions and applying a layout according to the blockif rules, not what you select in the layout tab. This gives a complete dynamic solution then, where site owner does not have to worry about selecting layouts, they just add the product and the layout works it out from what they put in.

    Typical example would be on whether there is an image defined or not etc., the code bringing in the image can be removed on a product with no image, thus giving a more streamlined and compact layout for non-imaged products.

    NB: Take the preview off when trawling and things are slow, will speed up tenfold then also.

    Comment


      #3
      ok, I'll give that a go when I wake up...

      Originally posted by leehack
      NB: Take the preview off when trawling and things are slow, will speed up tenfold then also.
      and that is with the preview off!!! The actinic DB is about 150mb compressed now...
      John

      Comment


        #4
        Umm, isn't the blockif stuff in V8 only? This is V7.

        Mike
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

        -----------------------------------------

        Comment


          #5
          ok, I'm awake now. What's all this stuff about blockif's?
          John

          Comment


            #6
            Ahah John you might be awake now, but i wasn't when i wrote the post, i can only claim that it was still dark and i couldn't see the forum name.

            My post was for V8 users. With V7 you are probably best to go and do it all manually cos it's junk compared to v8 on functionality like this.

            Comment


              #7
              so, "export; xl macro; import" it is then!
              John

              Comment


                #8
                Unfortunately Lee was in v8 mode - there no blockifs in v7.

                I think you may need to look into how to make an Access database update query to change the referenced layout. Make a backup of your database - make the change for one of the sections and then look in the database and locate the change - you will then know what needs to be updated.

                Comment


                  #9
                  I've just figured out that to do what I want I will also have to change thousands of product templates from 'use parent' to a specific template based on their parent. (I think so anyway, I'll take another look in 30 mins when it's finished uploading to make sure I didn't miss something...)

                  So I going to code it in perl, should only take a few hours to write, then I can modify it to change section templates or whatever...
                  John

                  Comment


                    #10
                    Why waste hours on this, save your pennies and get onto v8.

                    Comment


                      #11
                      with 15-20k products, and highly modified templates - just think how much could go wrong during the conversion - nightmare!

                      Think I'll wait for v9 and see if it has an features worth updrading for (real time account creation, order history etc etc)
                      John

                      Comment


                        #12
                        Originally posted by jxm28788
                        Think I'll wait for v9 and see if it has an features worth updrading for (real time account creation, order history etc etc)
                        LOL John, i'll see you on v11 then.

                        Comment

                        Working...
                        X