| 145 | === General `link` tag === |
| 146 | The `link` tags are used to define ''relations'' between the page and other pages, e.g. 'My startpage is at ..., the next page is at ...'. Trac itself adds a couple of link tags for `help`, `up`, `prev`, etc. for some pages. |
| 147 | |
| 148 | The following example would add a linked copyright notice (written plain text) and a shortcut icon to every Trac page. Please note that the information is not displayed by default to the user in any way and most browsers are ignoring link tags which aren't used for style sheets an shortcut icons. |
| 149 | |
| 150 | {{{ |
| 151 | # in trac.ini |
| 152 | [addheaders] |
| 153 | add_links = cpyrght,icon |
| 154 | |
| 155 | cpyrght.rel = copyright |
| 156 | cpyrght.type = text/plain |
| 157 | cpyrght.title = Copyright notice |
| 158 | cpyrght.href = /chrome/site/copyright.txt |
| 159 | |
| 160 | icon.rel = shortcut icon |
| 161 | icon.type = image/x-icon |
| 162 | icon.href = /chrome/site/favicon.ico |
| 163 | }}} |
| 164 | |
| 165 | This will result in the following added header: |
| 166 | {{{ |
| 167 | <link title="Copyright notice" type="text/plain" href="/chrome/site/copyright.txt" rel="copyright"> |
| 168 | <link type="image/x-icon" href="/chrome/site/icon.ico" rel="shortcut icon"> |
| 169 | }}} |