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?


Reply


2 Posts   1458 Views

Avatar
mapes911

Community Member, 12 Posts

5 May 2009 at 4:30pm

Hi all

I need to have some javascript appear on a specific page. In my page.ss 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!
thanks

Avatar
mapes911

Community Member, 12 Posts

5 May 2009 at 5:33pm

i found my answer!

http://silverstripe.org/archive/show/83408#post83408

:)