Free-Conversant Support / Resources
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 


Documentation >> Resources


Table of Contents

What are Resources?

Resources are primarily a convenience feature. They offer a way to type a very short piece of text which will automatically be replaced with a longer piece of text when a page is served. There are a few different kinds of resource, including Conditional, Image, Link, and Text. Each has different purposes and uses, but they're all used in the same way.

One of the largest benefits of resources is that they are only "expanded" when a page is being viewed. This means that if you edit your resource, the changes will immediately be shown everywhere that the resource is used.

Resources can be used anywhere in your Conversant conversation, including messages, templates, macro attributes, and even in other resources.

Every resource has a name, which is the "key" to using it in a template. The name can can be any string of text which is less than 255 characters long, but it is generally recommended that names be kept short. Resource names can not contain the vertical pipe character. Resource names are not case sensitive, so a resource named "my favorite link" is exactly the same as one named "My Favorite Link".

Reverse chronological view Back to Top

Using Resources

Use a resource by typing its name with a "vertical pipe" at each end, like this: |My Favorite Link|. If your conversation contains a resource with the name between the pipes, then the entire key (including the pipes, of course) will all be replaced with the value of that resource. (For future reference, note that when discussing resources it is said that the pipe is the "resource delimiter".)

On most keyboards, the pipe character is typed with a shift-\ (shift-backslash). Some keyboards show a single vertical line for the pipe, and others show a double vertical line with one above the other (in fact the same is true for fonts).

A picture of the pipe key on a keyboard.A picture of the 'double' pipe key on a keyboard.

Reverse chronological view Back to Top

Creating and Editing Resources

Resources can be created in two ways: automatically, and manually.

A link resource is created automatically when a message is published (ie "bound to a URL"). In this case, the new resource will be named according to the subject of the message, and will point to the new, published page. Note that if there is already a resource with the same name, a new resource will not be created.

Resources are created and edited manually through the Resource Editor portion of the admin interface. Access the resource editor by following these steps:

  1. Go to the admin area of your conversation.
  2. Click on "Manage Conversations"
  3. Click on the name of the conversation whose resources you want to edit (note that you may only have one conversation in the list).
  4. In the navigation bar on the left, click on "Resources"

To edit the value of an existing resource, click on its name in the list.

To create a new resource, enter the name of the resource in the form at the top ("Add Resource"), choose a resource type from the list, and then click on "Add New Resource". The page that loads will show the values for a new, empty resource of the type you chose. Enter the values, and click the Save Changes button at the bottom of the form.

Reverse chronological view Back to Top

Resource Types

There are four different resource types, which provide four separate-but-related features.

  • Text

    Text resources are the simplest form of resource. Whatever is entered as the value of the resource (in the resource editor) is what replaces the 'resource key' in the rendered page.

    Text resource can contain other resources and macros, and those resources and macros will be fully processed before the final value replaces the original resource key.

  • Link

    Link resources are the most commonly used resource type. The name of the resource becomes a link to the URL defined in the resource's value. For example, there is a link resource in this site named, "Breadcrumbs Macro", which points to the documentation for a navigational-aid macro. Typing |Breadcrumbs Macro|, therefore, automatically results in this link: Breadcrumbs Macro.

    Link resources can contain any URL, so they can point anywhere (even to email addresses).

  • Image

    Image resources produce <img> tags. Therefore, image resources in a page are replaced with an image (in the browser).

    For example, this conversation has a resource called "arrow_down". Typing |arrow_down| results in Forward chronological view being displayed in its place.

    It's important to note that image resources do not actually contain or manage image files! They're simply a convenient way to manage image tags.

  • Conditional

    Conditional resources allow you to specify three different "values" for the resource. The value that actually replaces the original resource key depends on the user that will see the page. There's one version for guests (anyone who hasn't logged on), another for members (anyone with a valid, active account with the conversation), and the third is only shown to administrators.

    Conditional resources were available before Conversant's Conditional Macros, which allow you to do the same things (and many more). However, conditional resources are still fully supported, and which one to use is entirely up to you.

Reverse chronological view Back to Top

View in DG