Using Documents and Media

Creating Content
Step 2 of 7

Liferay DXP’s Documents and Media features provide tools for uploading, organizing, and displaying various types of documents and media, including images, audio, and video. For example, you can use Documents and Media for collaborating on files like text documents or spreadsheets, managing collections of images, or simply storing the images that your web content references.

You’ve been using Documents and Media without knowing it. The images you added when creating web content were automatically added to the Documents and Media library. But there’s a more efficient way to add images to Documents and Media. You can add many images at once, directly in the Documents and Media library. This saves you a step when creating content that uses those images. Working directly in the Documents and Media library also lets you organize your files in folders just as you would on a traditional desktop environment.

Now you’ll take advantage of these features in the Lunar Resort.

Adding Files

You still need to create more content in the Lunar Resort, and this content needs images. You’ll upload all these images now in the Documents and Media library:

  1. Open the Menu (Product Menu) and select The Lunar ResortContentDocuments and Media. The Documents and Media screen appears and displays the Documents and Media library’s Home folder (its root folder). Note that the images you added while creating content earlier are all here.

    Figure 1: The Documents and Media librarys Home folder contains the Lunar Resorts existing images.

    Figure 1: The Documents and Media library's Home folder contains the Lunar Resort's existing images.

  2. Click the Add icon (Add) at the bottom-right of the page and select Multiple Documents.

  3. Use the Add Multiple Documents screen to add the images moon-image1.jpg, moon-image2.jpg, moon-image3.jpg, booking-image.png, guide-cody.png, guide-jim.png, guide-russ.png, and guide-steve.png. You can either drag and drop the files from your file system to the box, or click Select Files to select the files via a file manager window. If you wish, you can also categorize and describe the files. Click Publish to complete the upload.

    Figure 2: The Documents and Media library lets you add multiple documents at once.

    Figure 2: The Documents and Media library lets you add multiple documents at once.

Great! The Lunar Resort’s Documents and Media library now contains more images–enough to warrant organizing them in folders.

Adding Folders

Your Documents and Media library is now a bit more crowded. It’s time to organize it with folders. Besides basic file organization, you can also use folders for managing access to files via permissions.

Follow these steps to add some folders to the Lunar Resort’s Documents and Media library:

  1. Return to the Documents and Media library’s Home folder.

  2. Click the Add icon (Add) at the bottom-right of the page and select Folder.

  3. Name the folder Web Content Images, and give it the description Images used in Lunar Resort Web Content.

  4. Click Save. This returns you to the Documents and Media library’s Home folder, where your new folder is now available.

  5. Repeat the steps above to folders named Frontpage Images and Lunar Guides to the Home folder.

Sweet! The Lunar Resort’s Documents and Media library now contains two folders. You’ll use them to organize images next.

Organizing Media

Before moving your files into the new folders, it’s important to know that you can move files that are currently in use, without issue. For example, if a piece of web content uses an image, and you move that image to a different Documents and Media folder, you don’t need to update that web content with the image’s new location. Liferay DXP maintains such file connections for you.

Follow these steps to move files to your new folders:

  1. Return to the Documents and Media library’s Home folder and check the boxes on the images lunar-resort.png, space.png, and space-program.png.

  2. Drag and drop the selected images to the Web Content Images folder.

    Figure 3: The Documents and Media library lets you drag and drop files into a folder.

    Figure 3: The Documents and Media library lets you drag and drop files into a folder.

  3. The next screen lets you review and confirm the move. It also lets you change which files are included, and their destination. Leave the default selections and click Move.

  4. Repeat these steps to move the guide images to the Lunar Guides folder and the Home folder’s remaining files to the Frontpage Images folder.

Well done! Now your Documents and Media library contains the images you need for creating more content. You also learned how to upload and manage files in Documents and Media. Next, you’ll learn about creating more complex content and styles using structures and templates.

« Creating More ContentWeb Content Structures and Templates »
Esse artigo foi útil?
Usuários que acharam isso útil: 0 de 0