mjda
Well-known member
I'm trying to auto-create a new thread when I add a new entity in my add-on. However, I can't use a phrase for the thread message because some variables may not exist so I need to be able to use
The question is, is this even possible? If so, how?
...or, is there a better way to do what I'm wanting to do?
<xf:if />
code. So, I was thinking how about using a template, such as something like this:
PHP:
protected function getThreadMessage()
{
$category = $this->category;
$entity = $this->entity;
$message = \XF::someWayToGetTemplateContents($entity);
return $message;
}
The question is, is this even possible? If so, how?
...or, is there a better way to do what I'm wanting to do?