Announcement

Collapse
No announcement yet.

copy one variable to another

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

    copy one variable to another

    Hi folks

    Is it possible to copy the contents of a variable to the contents of another (NOT right click -->copy in the libraray, but as follows):

    ie.
    I have one variable (varA), set at product level - with different content in, each time. so :
    varA = text1 on product X,
    varA = text2 on product Y
    etc etc

    Is there a way I can copy the same content into another variable (varB) automatically, without phsycially having to do each one in turn
    eg
    varB = "same as the varA content" on product X,
    varB = "same as the varA content" on product Y
    etc etc

    Many thanks in advance
    Simon
    www.spcmarketing.co.uk

    #2
    If you want VarB to have the same as VarA, why create VarB at all? Can't you just use VarA twice? Have i missed something?

    If you wanted to duplicate the contents into another, you could do it in the database or via an export/import to excel.

    Comment


      #3
      yes

      I though that would get asked !!

      Reason being, varA is required to be type "file content"
      varB is required to be type "filename"

      I wondered if there was a way of doing it without import/export option.
      Thanks

      Comment


        #4
        Sounds like you can still use it to me, you can use the contents to part fill out fields, such as appending '.jpg' if was an image etc. Need to know your situation of course, possible it could be done though.

        Comment


          #5
          Ok Lee

          Thanks for your help
          I will have a play !

          Cheers
          Simon

          Comment


            #6
            Does this help from the Advanced User Guide?

            Code:
            Sometimes when a filename variable is used in certain contexts, the entire filepath is displayed online, instead of just the filename.
            In other words, instead of:
            image.gif
            ... what actually gets included in the code is:
            C:\My Documements\Actinic v8\Sites\Site1\image.gif
            To avoid this, replace the variable in the code e.g.:
            <actinic:variable name="VariableName"/>
            ...with the following PHP expression:
            <actinic:block php="true">echo basename('<actinic:variable name="VariableName"/>');</actinic:block>

            Comment


              #7
              thanks for your help guys.
              Much appreciated

              Comment

              Working...
              X