Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

HTML/Javascript for specific page name?


2 Posts   1396 Views


5 May 2009 at 4:30pm Community Member, 12 Posts

Hi all

I need to have some javascript appear on a specific page. In my i've tried a few things like

<% if MenuTitle(thank-you) %>
javascript stuff....
<% end_if %>

but it shows up on every page of type page. is there a way within the template files to determine what page you are on?
i've also tried

<% if ID(33) %>
javascript stuff....
<% end_if %>

but no luck.

help please!


5 May 2009 at 5:33pm Community Member, 12 Posts

i found my answer!