Free-Conversant Support / How-To Add Labels To Topics Pages
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Outline of How-To Docs >> How-To Add Labels To Topics Pages

Content

If the labels aren't already displayed in your Topics page, we'll see here how to add them. If you're using several topics pages, you'll have to do this for each of them.

Depending on the case we'll:

Decide What To Do

As for the DG Calendar Page, the first thing to ask is "did you modify the page's templates?" The Topics pages have two templates called Page Template and Item Template. These templates are located at:

"/yourSite/admins/conversation/yourSite/structure$path=yourSite%2FpageName"

... where pageName defaults to "topics".

Did you edit them?

Reset The Topics Page

Resetting the Topics page will allow you to get the new default templates. If you use your own templates, you certainly don't want to overwrite them. In this case, jump to Editing The Templates.

  1. If you're not already there, go to:

    "/yourSite/admins/conversation/yourSite/structure$path=yourSite%2FpageName"

  2. Look at the current settings of your Topics page (like the stylesheet, the Javascript or the magicNavbars it uses). If needed, write them down. You'll have to restore your own settings.

  3. Scroll the page all the way down and click on Delete.

  4. You'll be prompted to confirm. Make sure you're not deleting the wrong page and click on OK. The page will be deleted and you'll be returned to the listing of the folder which contained it.

  5. Scroll the window all the way down, to get the Add New File Or Folder form.

  6. In the Navigation Title field enter the name of your calendar page (by default it's "topics"). Select "Topics Page" in the File Type popup menu, and click on Add New File.

  7. When the page has reloaded, locate in the listing the page you just created, and click on its name.

  8. Then, you'll get the File Properties screen of that page, where you'll just have to restore your settings. A few choices in popup menus, and you're done.

  9. Finally, click on Change File Properties. That's it, the page will reload, confirming the changes, and you're done. Click on the View Page link to jump to your topics page, and enjoy using labels.

If you need to add labels to other areas of your conversation, see More Infos.

Edit the templates

Each Topics page has two templates called Page Template and Item Template.

That's the templates we'll edit. They're located at:

"/yourSite/admins/conversation/yourSite/structure$path=yourSite%2FpageName"

Page Template

This template contains the header of the Topics table. We'll add a new column, here.

If you find easier to edit the templates in a text editor that doesn't force the text to wrap, use copy/paste.

There's no macro to use in this template. All you need is a new column.

Example

Here's what we added to the default template:

<td class='listDayHeaderCell'><span class='listDayHeaderText'>Labels</span></td>

Item Template

This template is used for each message displayed in the Topics page.

Macros

Here are the macro you may call from this template. As usual, macro calls are on the form "<!--#macroName-->".

  • topicLabel
    This will be replaced with a colored block (colored with the label's color, of course). You may use it alone.
  • topicLabelCellStyle
    This macro is assumed to be called from inside a <td> tag. It will be replaced with the td's bgcolor attribute setting the whole cell to the label's color.
  • topicLabelColor
    This will be simply replaced with the label's color. Use it if you don't want to use a HTML table and topicLabelCellStyle.
  • topicLabelTextColor
    This will be simply replaced with the label's text color. You may call it from a <font> tag, for example.
  • topicLabelName
    This will be replaced with the label's name.
  • topicLabelId
    This will be replaced with the label's id (its unique, not editable identifier).

Example

Here's what we added to the default item template:

<td nowrap valign='middle' <!--#topicLabelCellStyle-->>
	<span class='topicsText'>
		<font color='<!--#topicLabelTextColor-->'><!--#topicLabelName--></font>
	</span>
</td>

This puts the whole label cell of the table in the label's color, and displays the label's name.

When you're done editing both templates (and pasting them back in the File Properties screen if you edited them in an external text editor), click on Change File Properties. The page will reload, confirming the changes.

That's it, you're done. Click on "View Page" to jump to your Topics page.

More Infos

If you're adding labels to your whole conversation, you may want to go back to the labels documentation, where you'll find links to the other How-To's about labels.

If you need more infos about the Topics Page, see the Topics Pages documentation.

View in DG


This site managed with Conversant, © Copyright 2007 Macrobyte Resources