• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Search result template caller?

CyberAP

Well-known member
#1
Is it possible to get a template caller name when using search_result templates?

For example we have member_recent_content that calls search_result_*content type*. Can we use some variable in search_result_... to determine who called it? So for example in member_view we have one display of posts but in search results it's different.
 

Mike

XenForo developer
Staff member
#2
You can look at $viewName, $controllerName and/or $controllerAction in the template and react based on that.