PWaddict Posted July 21, 2017 Posted July 21, 2017 How to echo only one value (the lowest one) of a float field from a Page Table?
PWaddict Posted July 22, 2017 Author Posted July 22, 2017 Ok got it. I had to access children of children. The $release is from another foreach loop where I'm getting the page's children and with the below code I'm getting the children of children with only one and lowest value from a float field. <?php foreach($release->children("limit=1, sort=pad_price") as $p) { ?> <?= $cart->renderPriceAndCurrency($p->pad_price) ?> <?php } ?> 1
adrian Posted July 22, 2017 Posted July 22, 2017 You could also just do this. By using "first()" you avoid the need for the foreach loop. $cart->renderPriceAndCurrency($release->children("limit=1, sort=pad_price")->first()->pad_price); 3
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now