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.

Template Questions /

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

Blocking scripts from search results


Go to End


2 Posts   1155 Views

Avatar
shakingpaper

Community Member, 15 Posts

7 April 2010 at 5:09pm

For some reason, scripts I have in my HomePage.php file are being called into the search results page. I have tried creating a SearchPage.php, placing the search snippets from the Page.php file and adding the Requirements::block function for the specific .js files with no luck.

If I want to block .js in search results, where which file should I edit?

Avatar
baba-papa

Community Member, 279 Posts

7 April 2010 at 8:30pm

This is a very strange bahaviour. It might be that you included your scripts the wrong way.