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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   2372 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