boldwords
Simply wraps <b> html tags around the text within the [boldwords] word list context.
[boldwords words=wordlist]Any Text[/boldwords]
To automatically boldface matching words in portions of a template, put a [boldwords] context around the text. Any words inside the context found to match words in the wordlist will automatically be wrapped by the html <b></b> tags so they appear bold on the page.
Example WebDNA code:
This context is handy for helping visitors easily see what they are searching for in a database. In the following example, the visitor has previously typed some text into a search form with a <input name="wodescriptiondata"> form variable. The [foundItems] will loop through all the matching records in the database, and words matching the search text will be displayed boldface in the [description] field.
Example WebDNA code:
Example WebDNA code:
[boldwords words=Grant,John]
John and Grant helped write WebDNA.
John's cats are displayed on his personal web page.
[/boldwords]
Results:John and Grant helped write WebDNA.
John's cats are displayed on his personal web page.
This context is handy for helping visitors easily see what they are searching for in a database. In the following example, the visitor has previously typed some text into a search form with a <input name="wodescriptiondata"> form variable. The [foundItems] will loop through all the matching records in the database, and words matching the search text will be displayed boldface in the [description] field.
Example WebDNA code:
[founditems]
[boldwords words=[wodescriptiondata]][description][/boldwords]
[/founditems]
A maximum of 50 words is allowed in the wordlist. You can put as many words as you like inside the context, and all occurrences of matching words will be bolded, but the list of words to look for is limited to 50.