Announcement

Collapse
No announcement yet.

Dividing a number in a variable

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

    Dividing a number in a variable

    I have a custom variable that generates a number for a review rating, but need to halve this for Google structured data.

    Is there an easy way to use the variable and divide it by 2?

    Many thanks
    Regards

    Jason

    #2
    Code:
    <actinic:block php="true">echo <actinic:variable name="myvariable" selectable="false" /> / 2;</actinic:block>
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Many thanks Norman, it did the job perfectly.

      Kind regards

      Jason
      Regards

      Jason

      Comment


        #4
        The other way is to tell google the rating is out of 10.

        Comment


          #5
          I did tell google my ratings were out of 10 and it did validate in the test tool.

          The problem was that some products were showing errors in webmaster tools, whilst others were fine. There really didn't seem any reason why some were fine, but others were not.

          I thought the best way was to revert to the out of 5 review system and Norman's code works a treat.
          Regards

          Jason

          Comment

          Working...
          X