---
title: "LinkViewHelper"
manual: "News system"
version: "main"
permalink: "https://docs.typo3.org/permalink/georgringer/news:viewhelperlink@main"
source: "Reference/ViewHelpers/LinkViewHelper.rst"
rendered: "2026-09-23T19:24:09+00:00"
---

# LinkViewHelper {#viewhelperlink}

ViewHelper to render links from news records to detail view or page

**Type:** Tag Based

## General properties {#general-properties}

| Name: | Type: | Description: | Default value: |
| --- | --- | --- | --- |
| accesskey | string | Keyboard shortcut to access this element |  |
| additionalAttributes | array | Additional tag attributes. They will be added directly to the resulting HTML tag. |  |
| class | string | CSS class(es) for this element |  |
| configuration | array | optional typolink configuration | Array |
| dir | string | Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left) |  |
| id | string | Unique (in this file) identifier for this HTML element. |  |
| lang | string | Language for this element. Use short names specified in RFC 1766 |  |
| \* newsItem | Tx_News_Domain_Model_News | current news object |  |
| onclick | string | JavaScript evaluated for the onclick event |  |
| settings | array |  | Array |
| style | string | Individual CSS styles for this element |  |
| tabindex | integer | Specifies the tab order of this element |  |
| title | string | Tooltip text of element |  |
| uriOnly | boolean | return only the url without the a-tag |  |

## Examples {#examples}

### Basic link {#basic-link}

Code:

```php
<n:link newsItem="{newsItem}" settings="{settings}">
   {newsItem.title}
</n:link>

```

Output:

```php
A link to the given news record using the news title as link text

```

### Set an additional attribute {#set-an-additional-attribute}

Available: class, dir, id, lang, style, title, accesskey, tabindex, onclick

Code:

```php
<n:link newsItem="{newsItem}" settings="{settings}" class="a-link-class">fo</n:link>

```

Output:

```php
<a href="link" class="a-link-class">fo</a>

```

### Return the link only {#return-the-link-only}

Code:

```php
<n:link newsItem="{newsItem}" settings="{settings}" uriOnly="1" />

```

Output:

```php
The uri is returned

```

### Add additional parameters to the url {#add-additional-parameters-to-the-url}

Code:

```php
<n:link newsItem="{newsItem}" settings="{settings}" configuration="{additionalParams:'&tx_news_pi1[category]=111'}">fo</n:link>

```

Output:

```php
<a href="link&tx_news_pi1[category]=111">fo</a>
```
