<?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" role="NotInToc">
    <title>Manage content list viewer by query</title>
    <para>The <emphasis role="bold">Content By Query</emphasis> portlet allows you to collect and display data throughout a workspace by using a query instead of selecting items by a folder or by content.</para>
    <para>To use this portlet, first you need to add the <emphasis role="bold">Content By Query</emphasis> portlet to a specific page as follows:</para>
    <procedure>
        <step>
            <para>Drag and drop the <emphasis role="bold">Content By Query</emphasis> portlet from the <menuchoice><guimenu>Page Editor</guimenu><guisubmenu>Applications</guisubmenu><guimenuitem>Content</guimenuitem></menuchoice> to the main pane. You can do this step while <link linkend="sect-User_Guide-Page_Creation_Wizard">creating a new page</link> or <link linkend="sect-User_Guide-Manage_Pages-Edit_a_Page">editing an existing page</link> or <link linkend="proc-User_Guide-Manage_Portals-Edit_Layout">editing the layout of a portal</link>.</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="150mm" scalefit="1"/>
                </imageobject>
            </mediaobject>
       </step>
        <step>
            <para>
                Edit the <emphasis role="bold">Content By Query</emphasis> portlet by hovering your cursor over it, then click
                <inlinemediaobject>
                    <imageobject>
                        <imagedata fileref="images/edit_icon1.png" format="PNG" scalefit="1" width="4mm"/>
                    </imageobject>
                    <textobject>
                        <phrase>pencil</phrase>
                    </textobject>
                </inlinemediaobject> 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="130mm"/>
                </imageobject>
            </mediaobject>
            <para>The form with the
            <guilabel>Edit Mode</guilabel> 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.</para>
        </step>
        <step>
            <para>Click <guibutton>Save</guibutton> to complete adding the <emphasis role="bold">Content By Query</emphasis> portlet.</para>
        </step>
        <step>
            <para>Click
                <inlinemediaobject>
                    <imageobject>
                        <imagedata fileref="images/Finish_icon.png" format="PNG" scalefit="1" width="3mm"/>
                    </imageobject>
                    <textobject>
                        <phrase>pencil</phrase>
                    </textobject>
                </inlinemediaobject>
                to quit the
                <emphasis role="bold">Page Editor</emphasis>
                page and see the displayed data.
            </para>
        </step>
    </procedure>
    <note>
        <para>To learn more about fields in the <guilabel>Edit Mode</guilabel> tab, refer to <link linkend="form-User_Guide-Preferences-Content_List_Preferences.">Content List Preferences</link>.</para>
    </note>
</section>
