XF 2.0 How can we call js just one page?

Ovunc Dinc

Well-known member
Hi,
I would like to ask How can I use <xf:if is="$template != 'page_view'">code in pages?

Do we normally use the following code to call a js on the page?
Code:
<xf:if is="$template != 'page_view'">

When I add this code to global js it looks in forum_view templates.
But I just want to see in the which page has the code, is there an error or the code is wrong?

For example

Code:
<xf:if is="$template != 'page_view'">
<script src="{{ js_url('homepage/bootstrap.min.js') }}"></script>
</xf:if>

It could be works just in home page.

I've been trying but maybe someone knows how to do already add this it would be super awesome.
Thanks.

@Chris D
 
Last edited:
Top Bottom