What are the link types meant for?

Just wondering how the link types are meant to be used.  I added a new type under Database > Link Types called Business Resources and want to display that type on a web page.  Do I need to use categories instead?

Have more questions? Submit a request

1 Comments

  • 0
    Avatar
    Michael Slater

    Link types indicate the kind of thing you are linking to; categories are for what the link is about.

     

    So business resources is a reasonable use of a link type. It would make the most sense if you had business resources in different categories. If there are no categories of business resources, then you could use a category instead.

    To show all the links of a type, use an iterator like this:

    <ul>

    <w:kb:item:each type="linktype">

       <li><a href="<w:url />"><w:name /></a></li>

    </w:kb:item>

    </ul>

    If you wanted to divide the list by category, use something like this:

    <w:kb:category:each>

        <h2>Category: <w:name /></h2>

       <ul>

        <w:kb:item:each type="linktype" category="current">

            <li><a href="<w:url />"><w:name /></a></li>

        </w:kb:item:each>

        </ul>

    </w:kb:category:each>

    There's a much more elaborate example here, for a category page that list items of all types that are assigned to that category:

    http://support.webvanta.com/cookbook_item/76688-category-page/28569-knowledgebase-system

Please sign in to leave a comment.
Powered by Zendesk