Getting variables for displaying issue_toc.tpl

I am using OJS 3.1.1, and am preparing a plugin that sends an html email wiht the list of issue contents.

I am using the Issue::published hook, and have progressed to the point that I can fetch a smarty template. I am using the issue_toc.tpl as a basis.

However, I cannot get the proper issue template set up. I keep getting an error on

    $issue = $emailTOC->getAuthorizedContextObject(ASSOC_TYPE_ISSUE);

How do I get the proper issue object set up? When I pass $issue from the ISSUE class, then the template does not work because

getLocalizedCoverImageAltText

is not defined.

Help much appreciated, I have been going through so much code for the past few weeks, and this is the final step…

Stephen

HI @ssciberras,

What’s the exact hook that you’re using? I’m a couple versions ahead but I can’t find any Issue::published hook.