Welcome to the web home of Reece Marsland, a portfolio, online CV, blog etc...

Recent Articles

drupal search index

On a few of the projects I've worked on it's been an important requirement for the client to have a real fine grain control over the search results displayed for each keyword when using the core search module.

To achieve this level of control I’ve always opted for a CCK text field which is hidden from the typical node output. If the text in this field needs to have a higher weighting than any other content on the node then the field can be indexed inside a <h1> tag. Another requirement has also been to have this field automatically indexed whenever it is updated, which can be achieved with the following code:

Read More