# Document link widget

You use this widget to display a single document on your page. You can choose a document from the already uploaded documents or upload a new document. The *Document link* widget uses the `sfMediaField` directive and the `sfDocumentSelector`.\
For more details, see [Media field](https://www.progress.com/documentation/sitefinity-cms/media-field-mvc) and [Document selector](https://www.progress.com/documentation/sitefinity-cms/document-selector-mvc).

## Configure the Document link widget

After you place the *Document link* widget on your page, you must configure it to display a document.

To do this, click the *Edit* button in the upper-right corner of the widget.

In the *Document* window, you can choose whether to use a document in the library or upload a new document.

### Select a document

To select a document, you can:

* Filter by *My Documents* or *All Libraries*.\
  The system displays the documents uploaded most recently.
* Filter by library, categories, tags, or dates by expanding the *Other filters option* dropdown menu.
* Choose sorting options and change the layout of the view by clicking *Sorting and view*.
* Search for a document by starting to type its name.\
  Search results depend on *Enable search results only in selected folder and its subfolders* setting in *Administration > Settings > Advanced setting > Libraries*.\
  **NOTE**  : If you are searching for a document that has language versions, you can enable the option to get search results that include the document, even though it may be in a language different than the one currently selected.\
  For more information, see [Administration: Enable multilingual search results in media libraries](https://www.progress.com/documentation/sitefinity-cms/administration-enable-multilingual-search-results-in-media-libraries).
* Display a specific document by selecting the library where the document you want to display is located.\
  Click the document you want to display.

Click the *Done* button.

### Upload documents

In the right side of the window, select *Upload document*.

To upload a document, you can:

* Drag and drop the document in the window
* Click *Select document from your computer*, browse your computer to find the document you want to upload. Click *Open*.\
  **NOTE:**   You can select and display only one document.
* Change the default library where documents are uploaded by clicking the *Change* button.\
  Select the library and click *Done selecting*.
* Optionally, change the *Title* of the document.
* Change the categories and the tags of the document by expanding the *Categories and tags* section.\
  For more information, see [Add categories and tags to content items.](https://www.progress.com/documentation/sitefinity-cms/add-categories-and-tags-to-content-items)

Next, click *Upload*.

### Edit document properties

After you select a document or upload a new one, you can see the document properties such as type, file size, and upload date.
To change the selected document, click *Change* document button and select or upload new document.

To edit document properties:

1. To edit general document properties, click *Edit all properties*.
   You can edit categories, tags, URL, and so forth. For more information, see [Edit the properties of documents and files.](https://www.progress.com/documentation/sitefinity-cms/edit-the-properties-of-documents-and-files)
2. From the *Template* dropdown menu, select a widget template to use for this *Document link* widget.
3. To apply additional CSS classes to the widget, expand *More options* section and specify CSS file names.
4. In case you created predefined styles, you can use the *Style* dropdown menu, which lists your predefined styles. For more information, see [Adding predefined styles to widget](https://www.progress.com/documentation/sitefinity-cms/add-predefined-styles-mvc).
5. Click *Save*.

### Configure the Document link widget in multisite environment

If you are using multiple site management and the *Libraries* module uses data sources from more than one site, you must first choose the source from which you want to display documents or where a document, uploaded from your computer, is saved. To do this, use the dropdown menu in the upper-right corner of the window and select a provider.

For more information, see [Multisite: Manage multiple sites.](https://docs.sitefinity.com/Sitefinity/Dialog/multisite-manage-multiple-sites)

### <https://docs.sitefinity.com/Sitefinity/Dialog/multisite-manage-multiple-sitesConfigure> the Document link widget in multilingual environment

If your site is multilingual and the page you are editing is synchronized with another translation, when editing the widget, you can see a *Save to all translations* button. Once you click the button, the current widget configuration is saved to all translations. Otherwise, the widget configuration is saved just for the current translation. Pages are still synchronized. Thus, you can synchronize pages and have different widget configurations, but you cannot have different widgets.
