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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

HTML/Javascript for specific page name?


Go to End


2 Posts   1935 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