<sect2 id="using-mainwindow-tagsview">
    <title>Tags View</title>

    <para>
        (Hierarchical) tagging provides a flexible and powerful way to organize and catalog your images. Tags (also called <quote>keywords</quote> in other applications) are labels that can be applied to individual images or whole groups. Once a tag has been set to an image the image can be found again by selecting the tag or doing a search.
    </para>

    <para>
        Tags can be arranged in a hierarchical tree. This allows you to organize your tags in a logical manner. You can collapse parts of the tree in the <quote>Tags</quote> list so that you can easily find the tags that you are looking for.
    </para>

    <para></para>

    <para>
        <mediaobject>
            <imageobject><imagedata fileref="&path;using-mainwindow-tagsview.png" format="PNG" /></imageobject>
        </mediaobject>
    </para>

    <para>
        When a tag is selected in the Left Sidebar, all of the images that are marked with that tag are displayed in the View Area.
    </para>

    <para>
        But before assigning and using tags you first have to define them. If you import photographs with tags assigned &digikam; will build an appropriate tag tree during import. Other than that you have to define tags by yourself. An easy access to that is the context menu shown in the screenshot above.
    </para>

    <sect3 id="using-managetags"> <title>Managing Tags</title>

        <para>
            You can add new tags by clicking with the &RMB; on either the <quote>Tags</quote> label or an existing tag and selecting <guilabel>New Tag...</guilabel>. A dialog will open where you can type in the tag name (or even a whole hierarchy branch), assign an icon and/or a shortcut to the tag. If you add a new tag by clicking with the &RMB; on an existing tag, your new tag will be created as a sub-tag.
        </para>

        <para>
            You can delete a tag by clicking with the &RMB; on the tag you want to delete and selecting <guilabel>Delete Tag</guilabel>. When you delete a tag, the photographs themselves are not deleted. Simply the tag is removed from those photographs.
        </para>

        <para>
            You can move the position of a tag within the tree by dragging it to the position that you want and dropping it there. A menu will appear that gives you the option to
            <guilabel>Move</guilabel> the tag. This works from the left and right sidebar. A tag can only be in one place in the tree at a time.
        </para>

        <para>
            You can set the Tag Properties by clicking with the &RMB; on a tag and selecting <guilabel>Properties...</guilabel>. The Tag Properties allow you to change the name of the tag, the icon used in the Tags tree and the shortcut.
        </para>

        <para>
            To select a photograph as the tag icon, click with the &RMB; on the photograph that you want to use as the tag icon and select <guilabel>Set as Tag Thumbnail</guilabel> from the context menu. Additionally you can use drag and drop to set the tag icon. Drag the images icon and drop it on the currently selected tag in the tag list.
        </para>

        <para>
            A tool for more elaborate work on big tag trees is the <link linkend="using-tagsmngr">Tags Manager</link> which you can access by clicking the <guilabel>Open Tag Manager</guilabel> button at the top of the Tags tree.
        </para>

        <para>
            In the <link linkend="keywords">Digital Asset Management (DAM)</link> chapter of this handbook you can find some useful considerations about how to build your Tags tree.
        </para>

        <para> 
            It is not always easy to build a logical hierarchy from general and generic categories. You might run into a problem like this:
        </para>

        <blockquote><screen>
            Animal
                - Domestic Animal
                    - Cat
                    - Cattle
                    - Dog

                - Wild Animal
                    - Bird
                    - Cat
                        - Cheetah
                        - Lion
                        - Tiger

                - Zoo Animal
                    - Bird
                    - Cat
                        - Cheetah
                        - Leopard
        </screen></blockquote>

        <para>
            In this tag tree the keyword <quote>Cat</quote> appears three times. This will not cause a problem within &digikam; but there are quite a few views where the user cannot know which of the three is applied to an image because he might not be able to see the whole hierarchy of the tag. A help could be to tag the image in a case like this also with the parent tag or even the whole hierarchy but it becomes quite unwieldy, &eg; in the image icon if you have the tags displayed there. The second <quote>Cat</quote> can be avoided by calling it <quote>Wild Cat</quote> but calling the third one <quote>Zoo Cat</quote> is a bit out of the roof, I think. And still: there are also two <quote>Cheetah</quote>!
        </para>

        <para>
            Solution: You replace the <quote>Zoo Animal</quote> branch by a single tag <quote>Zoo</quote> which you use in addition to the tag you choose from the two remaining branches. You could even put it on the top level of your hierarchy if you have photographs taken in a zoo but not showing animals.
        </para>

    </sect3>

    <sect3 id="using-taggingimages"> <title>Tagging Photographs</title>

        <para>
            Before you can get the most out of &digikam;'s tagging capabilities, you must first tag your photographs. There are a few methods for that task. Once you have identified the photographs that you want to tag you can either drag and drop them onto the tag in the Tags tree or, by clicking with the &RMB; on the selected photographs in the Image Window, you can use the <guilabel>Assign Tag</guilabel> menu to select the tags you wish to set.
        </para>

        <para>
            Drag and Drop: works with both sidebars provided they are showing tags of course. With the Right Sidebar it works the obvious way: you drag the tag and drop it onto the photograph or selection of photographs you want to tag. With the Left Sidebar you have to drag the photographs to the tags. You want to know why? Just try it the other way and you will see :-)
        </para>

        <para>
            Shortcuts: as mentioned earlier in this chapter you can assign keyboard shortcuts in the Tag Properties. With these you can assign or un-assign a tag to the selected photograph(s).
        </para>

        <para>
            Context menu: by clicking with the &RMB; on the selected photographs and choosing <guilabel>Assign Tag</guilabel> you will see the next menu step offering the ten most recently used tags, <guilabel>Add New Tag...</guilabel>, described at the beginning of the previous <link linkend="using-managetags">article</link>, and <guilabel>More Tags...</guilabel> which leads to what is described in the next paragraph. The context menu method is obviously very useful if you use only a limited number of tags out of your whole tree for a while.
        </para>

        <example>
            <title>Tagging Image with context menu</title>
            <mediaobject>
                <imageobject><imagedata fileref="&path;using-mainwindow-assigntags.png" format="PNG" /></imageobject>
            </mediaobject>
        </example>

        <para>
            You can remove a tag from a photograph by clicking with the &RMB; on the photograph and using the <guilabel>Remove Tag</guilabel> menu. This menu will only show those tags that have been set on this photograph.
        </para>

        <para>
            The Right Sidebar: this is what I would call my standard method for assigning tags. Click <guilabel>Captions/Tags</guilabel> on the Right Sidebar and then the <guilabel>Tags</guilabel> tab and you will see the whole tags tree. Simply check/un-check the boxes of the tags you want to assign/un-assign and then click <guilabel>Apply</guilabel>. If you change focus without that you will be asked whether you want to apply the changes unless you disabled that confirmation either by checking <quote>Always apply changes without confirmation</quote> or by checking <quote>Do not confirm when applying changes in the right sidebar</quote> in the Miscellaneous section of <menuchoice><guimenu>Settings</guimenu> <guimenuitem>Configure digiKam...</guimenuitem></menuchoice>. More details about the other buttons and fields in the <guilabel>Tags</guilabel> tab see in <link linkend="using-sidebar-tags">&digikam; sidebar</link>.
        </para>

        <para>
            You can label a photograph with as many tags as you like. The photograph will appear when you select any of the tags that are set against it. This way you can set a tag for each person in a photograph, as well as the place the photograph was taken, the event it was taken at, &etc;
        </para>

        <para>
            Once you have tagged a photograph, the tag name will appear under the thumbnail in the Image Area.
        </para>

        <tip>
            <para>
                Tags are stored in a database for fast access, and, the applied tags are written into IPTC data fields of the image (at least for JPEG). So you can use your tags with other programs or, in case of loss of that data in the database, the tags will be re-imported when the image is noticed by &digikam;.
            </para>
        </tip>

    </sect3>

</sect2>

<!--
Local Variables:
mode: sgml
sgml-omittag: nil
sgml-shorttag: t
End:
-->
