Announcement

Collapse
No announcement yet.

Can Actinic Variable = Actinic PHP variable value

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

    Can Actinic Variable = Actinic PHP variable value

    Hi

    I was wondering, if there is any way to set an Actinic Variable from the Design Layout using a PHP variable?

    ie

    <actinic:block php="true">$productcount = 0;</actinic:block>

    <actinic:variable name="ProductList" />
    <!-- in ProductList layout add <actinic:block php="true">$productcount++;</actinic:block> -->

    <actinic:variable name="SectionProductCount" = $productcount />



    But as far as I can see Actinic variables are Constants, when Generating HTML. You can only input a Actinic variable into HTML layout.

    If there is a way to change them, when genrating Layout code, please let me know.

    I am thinking of making section automatically hide, when no products avaliable in that section/sub-sections. But I need a way to change the Section check box "Hide on Web Site", without Importing a File. Or being able to change a Actinic User defined variable would be fine.

    Regards
    Sean

    #2
    I think you got the answer to this on http://community.actinic.com/showthread.php?t=29616

    Kind regards,
    Bruce King
    SellerDeck

    Comment


      #3
      Hi Sean,

      I can't see a way of achieving this. The "Hide on Web Site" is rather a flag in the ActinicCatalog.mdb database. I can't see a way of not having any products, would hide the section.

      Sorry about that.
      Regards,

      Toby Blanchard

      Comment


        #4
        Cheers Bruce

        Thanks for the link to my own question - solution

        I am after PHP variable value to Actinic Variables. The other was me assigning PHP variable with Actinic variable as work around a Actinic glitch.

        My conclusion is Actinic Variables cannot be changed by PHP variables as Norman pointed out, Actinic variables are inserted before PHP is parsed. So are one way variables (Constants in PHP).

        Off course I could ODBC + ADO in PHP to access the Actinic Database tables and change it from there, but that seems like using a sledge hammer to open a Walnut. And if you change Actinic I have to update PHP.


        I hope you swap to a programming language like PHP on day soon. It would certainly be at the top of my wish list.

        I would be interested in the Developers Info on the Actinic database tables and assignments, if possible.

        Thanks
        Sean

        Comment


          #5
          I just reinstated Toby's post as that is the answer to your question. If you drop me an email I could send you a copy of the database dictionary, please note this is only for your reference.

          Kind regards,
          Bruce King
          SellerDeck

          Comment

          Working...
          X