Announcement

Collapse
No announcement yet.

How do you get customvars into the page?

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

    How do you get customvars into the page?

    I have been asked to migrate a V7 site into V8. My client has held off because of the large number of 'issues'.
    I am finding it a nighmare!!!
    I have a number of CUSTOMVARS from V7 that are whole html pages.
    Thry were set up this was as the html code was bigger than the text box could handle.
    On conversion they are now variables (found them in Settings/Site Options/Properties)

    BUT how do you get them into the centre section of the brochure pages!!
    I am assuming they must be added inside the variable INNERLAYOUT, but I cannot find the how?
    The conversaion guide and AUG do not mention CUSTOMVAR conversions.

    Thanks for any help.

    #2
    It is widely regarded as much better practice to completely redesign when moving from V7 to V8 becuase it was such a change. Upgrade the site, select a new theme and start from there. You can either tweak that theme or create your own in V8, being a designer i presume you have Dreamweaver and using the actinic integration with that is probably your best step.

    Comment


      #3
      Not the best news for my client.
      Hours more work and cost to upgrade, I am sure he will say go straight to OS commerce.
      Surely getting 100 lines of good html code into the brochure page using a variable Actinic has created cannot be that hard?

      Comment


        #4
        You can embed html into a fragment (usually text only layout) by using:

        !!<
        ADD HTML HERE
        >!!

        Maybe that is an interim solution you could use. You can include variables into designs, but it doesn't sound like you need to on the surface. Put the code in fragments.

        Comment


          #5
          how do you get them into the centre section of the brochure pages
          Tell us what you did in V7 and we can probably give the equivelant V8 way.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Process in V7
            1) Create customvar to hold html code - eg HOMECENTRE
            2) In Design Options/SiteDefaults/Properties set customvar to htm file name
            3) Insert in fragment text box
            !!<
            CUSTOMVAR:HOMECENTRE
            >!!

            Some htm files have more lines of code than can fit into the text box using !!< html>!!
            This allowed easy editing of complex html fragment content within dreamweaver.

            The import into V8 has created a variable for each of the htm files.
            Question
            How do you get the variable into the individaul fragment pages.
            I have 'played' with insert variable within the layout in Design view but this makes all the fragments have the same content as specified by the variable.
            I need each fragement to use its own variable.
            I appreciate I will probably need several hundred hours to relearn V8 but this will get me past the first hurdle and get the site usable in V8.

            Hope this makes sense, thanks for any help

            thanks

            Comment


              #7
              Or you could store the data as an external hmtl file and then include it in PHP.

              <actinic:block php="true" >
              $myfilename = "<actinic:variable name="your variable" />";
              If ($myfilename != "") {
              $filename = $myfilename".".html";
              if (file_exists($myfilename)) {
              include("$myfilename");
              } else {
              include("default.html");
              }
              }
              </actinic:block>
              This should include the external file if the variable is assigned the filename. If it can't find the file then it will display a default file (easily changed to remove this bit).

              This is modified from some working code so untested but should be OK.

              Mike

              Note: If using this, leave the extension off the filename as this bit of code assumes it will be .html
              -----------------------------------------

              First Tackle - Fly Fishing and Game Angling

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

              Comment


                #8
                You can copy-paste into a fragment and you are not limited to just one fragment per page, so can split the content up logically. All depends what you are doing with the html really. I suspect it sounds a little more complicated that it actually is and you can probably use fragments, leaving your client able to change things easily too.

                Comment


                  #9
                  Interesting approach - Mike
                  You do not state where in the layout or otherwise you would put this?
                  I have added this to the text box within !!< php >!! and changed the path to a server folder and its works a treat.
                  Cannot get it to recognise the V8 variable name though.

                  Comment


                    #10
                    The PHP has to run inside actinic and it will include the relevant file before uploading to the server.

                    You can put the code anywhere you want in your product layout.

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

                    First Tackle - Fly Fishing and Game Angling

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

                    Comment


                      #11
                      Or create a CV with type as File Content and place this in your layout with a blockif around so if null it will not display it.

                      Comment


                        #12
                        Actinic refuses to display the html however I put it in as the variable

                        <p><actinic:variable name="FragmentText" /></p>
                        <actinic:block if="%3cactinic%3avariable%20name%3d%22HOMECENTRE%22%20%2f%3e">

                        </actinic:block>

                        See screen shot
                        Attached Files

                        Comment


                          #13
                          Go to Design / Library and look at the definition of HOMECENTRE. Make sure it is of type "File content". That's the equivelant in V8 of V7's FILE NAME and USE FILE CONTENT.
                          Norman - www.drillpine.biz
                          Edinburgh, U K / Bitez, Turkey

                          Comment


                            #14
                            It is already
                            Attached Files

                            Comment


                              #15
                              You don't need upload checked, but that's not the problem.

                              Where exactly are you placing the code for the CV?
                              And where is the referenced file located?

                              Comment

                              Working...
                              X