• Newspublisher: Educate Me: getTemplateVars#

  • jaredloman Reply #1, 6 months ago

    Reply
    @BobRay,

    I've noticed you frequent these parts of the forums, so I thought I'd put a post here. First of all, I'm enjoying the book! I haven't made it that far in, but can see it's going to make a great reference!

    So, I'm exploring the code of Newspublisher, and noticed that you use the function getTemplateVars() which according to Bobsguides.com is deprecated code. For the sake of education, I'm wondering why you took this approach to get the TVs as opposed to the getMany method you describe later in the page?

    Just trying to learn a thing or two if you have a moment to spare and you care to share..

    Thanks!
    -Jared


  • BobRay Reply #2, 6 months ago

    Reply
    Are you using the Evolution version? That function is not used in the Revolution version. I don't think it's deprecated for Evolution, but I could be wrong.


  • jaredloman Reply #3, 6 months ago

    Reply
    Hey Bob,

    Thanks for your reply
    I'm using the Revolution version.. but realized that this is a "It's not you..it's me" situation.
    Due to this bug http://bugs.modx.com/issues/5965 I made some changes to the code, based upon some advice from another developer... I entirely forgot that I did that since it was just a copy and paste attempt to fix the issue.

    Boy do I feel silly now... Apparently I haven't hit the chapter in your book that tells me to remember the changes I make to code prior to blaming someone else. Sorry to have bothered you with this one!

    -Jared


  • BobRay Reply #4, 6 months ago

    Reply
    The current version of NP has a fix for that.

    (I hope I remembered to release it.)