harry1 Posted October 4, 2019 Share Posted October 4, 2019 Hi guys, Two question's here. I'm trying to display Client Credit on the Client Area Homepage: if (!is_null($primarySidebar->getChild('Client Details'))) { $primarySidebar->getChild('Client Details') ->addChild('Current Credit') ->setLabel('Credit: $' .$currentCredit) ->setOrder(100); } This works fine, however. I'd ideally like to do this: ->setLabel('<font color="green">Credit: $' .$currentCredit) And also style the $currentCredit variable. Any suggestions as to how to do this? Also, I'm trying to use ->setIcon('') however the icon is being displayed at the end of the text (on the right) instead of at the start (on the left). Any suggestions are greatly appreciated! Cheers Harry 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 4, 2019 Share Posted October 4, 2019 Hi Harry, 7 hours ago, harry1 said: Two question's here. I'm trying to display Client Credit on the Client Area Homepage: there's no point in reinventing the wheel, there's already a sidebar hook that does that... numerous variations and additions to that in the thread... 7 hours ago, harry1 said: This works fine, however. I'd ideally like to do this: ->setLabel('<font color="green">Credit: $' .$currentCredit) And also style the $currentCredit variable. Any suggestions as to how to do this? i'd suggest using sentq's hook for this as it could be modified for your styling needs... 8 hours ago, harry1 said: Also, I'm trying to use ->setIcon('') however the icon is being displayed at the end of the text (on the right) instead of at the start (on the left). that's expected behaviour - in v7, icons would be on the right; in v6, they used to be on the left... those positions are defined in the template... the usual way to get around it would be to use bodyhtml rather than a label... if you do that, you can put the FA code before the output... 1 Quote Link to comment Share on other sites More sharing options...
harry1 Posted October 8, 2019 Author Share Posted October 8, 2019 Thank you Brian. Appreciate the help mate. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.