--- myst: html_meta: "description": "" "property=og:description": "" "property=og:title": "" "keywords": "" --- # Exercise 9: Overriding a pattern TTW ```{warning} This exercise requires a working buildout using a fork of the `collective.jstraining` package. ``` In this exercise we will be overriding a pattern through the web. You will be working in the `exercise9` directory of the `collective.jstraining` package. ```{note} Overriding resources through the web is limited to resources using the `++plone++` namespace. For more information read ``` ## Installation In this exercise, we will first run the installation 1. Start up your Plone instance 2. Install the `Exercise 9` add-on ## Try current pattern Add a new page, and using the source code editor add a `

` element with the `exercise9` pattern ```xml

test

``` After saving, you should see `test Exercise 9 was here` ## Choose the pattern to override Go to the Site Setup, then to the Resource Registries. Under the `Overrides` tab, pick `++plone++exercise9/pattern.js`. Now modify the line: ```xml that.$el.append(' Exercise 9 was here'); ``` To be ```xml that.$el.append(' Exercise 9 has been overridden'); ``` ## Recompile bundle Go back to the `Registry` tab, and find the `exercise9` bundle. Click the `Build` button. Finally, click `Build it` ## Testing Now, if you go back to the page you added before, you should now see `test Exercise 9 has been overridden`.