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

Highlight search query in the page title


Go to End


4 Posts   1846 Views

Avatar
bettencourt

Community Member, 4 Posts

24 June 2013 at 9:54am

Hello,
I'm new to Silverstripe and i am trying to highlight the search results when the query string appears in the page title.
(I have managed to highlight the content text using ContextSummary and adding CSS for span.highlight)
How can this be done?
Thank you

Avatar
Webdoc

Community Member, 349 Posts

25 June 2013 at 8:49pm

You can find your answer here

-------------------------------------------------------------------------------------------
Arvixe Web Hosting / SilverStripe Community Liaison | Looking for quality SilverStripe Web Hosting? Look no further than Arvixe Web Hosting!

Avatar
bettencourt

Community Member, 4 Posts

27 June 2013 at 7:24pm

Thank you Webdoc,
but that page only highlights in the content part i want to also highlight the results in $Title. but ContextSummary doesn't work with title so maybe i have to add php code?

Avatar
bettencourt

Community Member, 4 Posts

30 June 2013 at 3:33am

Solved using
$MenuTitle.XML.ContextSummary
$Title.XML.ContextSummary