Reads the content of a field in $GLOBALS[\'lv\']


/ Published in: PHP
Save to your folder(s)

Takes the content of a listview field an puts it into a global variable.


Copy this code and paste it in your HTML
  1. <we:comment type="php">
  2. The following listview counts the number of "reglements" entries and puts them by we:setVar into to global variable "totalP".
  3. This variable is then written by we:var as a green button in the navigation.
  4. </we:comment>
  5.  
  6. <we:condition name="cond">
  7. <we:setVar to="global" nameto="clientID" from="session" namefrom="cid" />
  8. <we:conditionAdd field="pClient" var="clientID" compare="=" />
  9. </we:condition>
  10. <we:listview type="object" name="paiements" classid="1" condition="\$cond" order="we_id">
  11. <we:ifFound>
  12. <?php $totalP = $GLOBALS['lv']->anz_all; ?>
  13. </we:ifFound>
  14. </we:listview>
  15. <we:setVar to="global" nameto="totalP" from="global" namefrom="totalP" />

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.