<?xml version='1.0' encoding='UTF-8'?>
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "../../User_Guide.ent">
%BOOK_ENTITIES;
]>
<section id="sect-User_Guide-Content_By_Query">
    <title>Contents By Query</title>
    <para>The Contents By Query portlet allows you to collect and display data throughout a workspace instead of selecting items by a folder or by contents.</para>
    <para>To use this portlet, do as follows:</para>
    <procedure>
        <title>Add a Contents By Query portlet</title>
        <step>
            <title>Create a page:</title>
            <para>Go to <menuchoice>
                <guimenu>Site Editor</guimenu>
                <guimenuitem>Add New Page</guimenuitem>
            </menuchoice>, and then fill out all the necessary fields in the Wizard form.</para>
        </step>
        <step>
            <title>Drag and drop the Contents By Query portlet:</title>
            <para>In the step 3 of the page creation, from the <guilabel>content</guilabel> of the <guilabel>Page Editor</guilabel>, drag and drop the <guilabel>Contents By Query</guilabel> portlet in the page:</para>
            <mediaobject>
                <imageobject role="html">
                    <imagedata align="center" fileref="images/content_by_query.png" format="PNG"/>
                </imageobject>
                <imageobject role="fo">
                    <imagedata align="center" fileref="images/content_by_query.png" format="PNG" width="210mm"/>
                </imageobject>
            </mediaobject>
        </step>
        <step>
            <title>Edit the Contents By Query portlet:</title>
            <para>
                Hover your mouse over the Contents By Query portlet, then click the
                <inlinemediaobject>
                    <imageobject>
                        <imagedata fileref="images/editicon4.png" format="PNG"/>
                    </imageobject>
                    <textobject>
                        <phrase>pencil</phrase>
                    </textobject>
                </inlinemediaobject>
                icon to edit the portlet.
            </para>
            <mediaobject>
                <imageobject role="html">
                    <imagedata align="center" fileref="images/query.png" format="PNG"/>
                </imageobject>
                <imageobject role="fo">
                    <imagedata align="center" fileref="images/query.png" format="PNG" width="150mm"/>
                </imageobject>
            </mediaobject>
            <para>The form with the
            <emphasis role="bold">Edit Mode</emphasis>
            tab appears: </para>
            <mediaobject>
                <imageobject role="html">
                    <imagedata align="center" fileref="images/edit_mode_query.png" format="PNG"/>
                </imageobject>
                <imageobject role="fo">
                    <imagedata align="center" fileref="images/edit_mode_query.png" format="PNG" width="150mm"/>
                </imageobject>
            </mediaobject>
            </step>
        <step>
            <para>Enter a valid query into the <guilabel>by query</guilabel> field to get data that you want to display.</para>
        </step>
        <step>
            <para>Select a workspace where you want to get data from.</para>
        </step>
        <step>
            <para>Click <guilabel>Save</guilabel> to complete adding the <guilabel>Contents By Query</guilabel> portlet.</para>
        </step>
        <step>
            <para>Click <guilabel>Finish</guilabel> to quit the <guilabel>Page Editor</guilabel> page and see the displayed data.</para>
        </step>
    </procedure>
    <note>
        <para>To lear more about the fields in the <guilabel>Edit Mode</guilabel>, refer to <xref linkend="form-User_Guide-Preferences-Content_List_Preferences."/></para>
    </note>
</section>