Administrator Help - RC v3.3
Search for:  by:     Edit Help
 Chapter - 11.0 Relative Content Links

Relative Content Links allows establishing a logical link between a category or group of categories and a specific content template with further display of that template at a designated page within your classified. Designated pages pre-configured for a specific template display location.

11.0.1 How does it work

  • Create a "Custom Inclusive Pages" template in Content Management.
  • Link created template to a specific category (at any category level) AND to a specific content page at the same time.
  • The template displayed on a category specific page, only when this dynamic page (list of subcategories, list of ads, specific ad) presents content, which related to the specific category (which the template was linked to).
  • Create as many templates and link them to as many categories as you desire. Hence the custom content (advertisement, affiliated links, rss feeds, banners, etc..) would always relate to the category which it was linked to.

11.0.2 Templates

Only "Custom Inclusive Pages" templates in "Content Management" may be utilized for linking to categories.

Important: Template names intended for linking to categories must have a word link anywhere in a template name. This is done to distinguish linkable templates from the rest of the "Custom Inclusive Pages" templates, which you might have created prior and which have a different purpose. Template names may not exceed 50 characters in length.

Linked Templates guidelines

  • Must have a word link in template name
  • No ASP code allowed inside templates intended for linking
  • No other pages may be included (using SSI include method)
  • RSS Feeds allowed (text insertion code: :RSS=feed_name:)
  • Banners Rotator Zone Code allowed (text insertion code: :RotateBanner=zone_number:)
  • Dynamic Ads Display (custom developed for linked templates). Section 11.1.5 below.
  • Create templates with clean and valid HTML code. Even a single invalid HTML tag, which does not cause a visible error on a preview page, may seriously invalidate or reshape the page when template dynamically included into the designated page.
  • If using tables or any other layers with fixed width, make sure NOT to specify width over 400 px. If you have enabled portals on all pages, then specifying a fixed width over 400 px may affect a website layout. The best way is to center the content and let it fit the available width - use 99% as a width.
  • If you have a large volume of advertisement content and integrated 10 zones banner rotator is not enough, you may use client JavaScript random rotators to display an advertisement. Many free to use JavaScript image rotators are available from Sample JavaScript rotator included in cat2template_link_rotator templates in Content Management.

Note: Never edit template, which has a javascript code using WYSIWYG

Create a few new "Custom Inclusive Pages" templates at Content Management page and fill them with any desired content.

11.0.3 Display pages

Dynamically linked content displayed only at the dynamic classified pages, which render category or ad specific information.

The following 5 pages at the classified fall under this rule:

viewscat.asp - subcategories list page for each main category
viewlist.asp - ads list page for a specific subcategory (or all subcategories for specific main category) + list of 3-rd level categories (if available)
viewsublist.asp - ads list for a specific 3-rd level category.
viewad.asp - full ad view page.
advsearch.asp - Advanced search page (only if specific category being searched).

11.0.4 Linking Templates to Categories / Pages

Go to Relative Content from admin tasks page. This management page intended for linking custom templates to a specific category at any level and to the specific content page at the same time. Thus, the linking scheme is 3-dimensional with 3 linking components: Template > Category > Content page. In addition category inheritance scheme for templates and for ads display (would be discussed later on), creates a powerful and flexible display of the related content.

Begin with selecting the content pages where you would like to display the custom content. At the bottom the Relative Content admin page check the box next to the desired page and click "Save Configuration" button.

For advsearch.asp you may select a default template. Because search pages not related to categories (unless user selected a specific category from drop-down list while creating a search query), a default template should be specified if you wish to have content display at search page while category is NOT specified. The default template is not available for remaining 4 pages because those pages are always category specific.

Further instructions are based on an assumption that all 5 pages are enabled for linking custom content. It is also assumed that you have created a few "Custom Inclusive Pages" templates in "Content Management" with the word link in a name. Templates content is irrelevant at this point. You should be able to amend templates later on and make them relevant to the category if desired. The list of templates intended for linking would appear within all drop-down boxes in Category to Template Links section of the Relative Content admin page.

The linking page divided into 3 sections with respect to 3 category levels. Each section lists categories in respect to the level and linking pages relevant to that level.

Main Category level section - all 5 pages are relevant:

viewsublist.asp, viewlist.asp, viewad.asp, advsearch.asp, viewscat.asp

Subcategory level section - only 3 pages are relevant:

viewsublist.asp, viewlist.asp, viewad.asp
2 other pages do not relate to subcategories in any way and being excluded.

3-rd level category section (if 3-rd level is available) - only 2 pages are relevant:

viewsublist.asp, viewad.asp
3 other pages do not relate to 3-rd level in any way and being excluded.

You may see the difference in color of the border surrounding page names (at the linking page). Red border mean the page relates indirectly. Green border - directly. The difference revealed with an example.

Example: Page viewlist.aspindirectly relates to main category level because the content of this page (which is the list of all ads for certain subcategory) directly relates to the subcategory level.

If 2 different templates linked to viewlist.asp:

Fist template - at main category level to category "Cars"
Second template - at subcategory level to the subcategory "Cars > Acura"

Then second template (linked at subcategory level) would take precedence and be displayed at viewlist.asp page for subcategory "Acura".

Why then use viewlist.asp at main category level at all?

Essentially, the indirectly related pages are there only for simultaneously linking templates down to the category tree (for inheritance). That is template linked to viewlist.asp at main category level would push it to all subcategories under main category.

Following is most important section of this chapter for understanding of the linking process

There are 3 levels hierarchy linking buttons - "Create Link" (one for each category level), 5 global buttons - "Link to All" and 1 "Link All to:" button.

 Link All to:  The king of all linking. Button located at the bottom of Category to Template Links section. Simultaneously links selected template to ALL categories and ALL content pages. Practical, only if most of the pages/categories should be linked to a certain template filled with Dynamic Ads Display add-on (which may utilize an internal category dependency routine; see the related section below).

 Link to All  5 buttons (one for each content page). Each button links selected template to ALL categories at ALL levels for the respective page (under which button is clicked).

 Create Link  3 buttons (one for each category level). Would link selected templates for all pages at the current level to the current category and propagate links down the category tree to the levels below selected category.

Because of the propagation, the linking should be conducted from top category level down in the following order:

Use "Link All to:" button if necessary to have most or all categories/pages linked to the same template.

Then "Link to All" button if necessary to have most or ALL categories linked to the same template for the specific page.

Finally use "Create Link" buttons (beginning from the main category and down) to link a template:

  1. At Main level - button links selected templates for 5 listed pages to the selected main category and all subcategories/3-rd level categories under selected category.
  2. At Subcategory level - button links selected templates for 3 listed pages to the selected subcategory and 3-rd level categories under selected subcategory.
  3. At 3-rd level - button links selected templates for 2 listed pages to the selected 3-rd level category.

Note: If you select "none" from the drop-down selector, it would remove a link from the current level and down the category tree. To remove ALL links use the "Remove All links" button.

Templates may be previewed and edited by clicking "Preview & Quick Edit" button. The resulted window is a full featured template editor similar to the content management page with content preview but only for the linked templates.

As you may see, there are infinite ways of linking templates to categories/pages. There is however one more dynamic content addition which may be used inside linked templates to display respective (or not) to categories ads. It called a Dynamic Ads Display.

11.0.5 Dynamic Ads Display

Ads displayed by columns in a single row and presented as title/subject with first image (if attached). This dynamic add-on utilizes an internal category dependency routine to display ads at your content pages making it possible to display different, category specific ads form the same template linked to all categories. In order to integrate this add-on, a special code has to be inserted into the linked template. The code has a base structure similar to RSS and Banner Rotator zone textual code.

The syntax is as following:


NTICD - Parametersshould be substituted with a 5 digits options code.
The actual syntax may look like- :AD=26121:

Such a code may be inserted into any linkable template and template linked to categories/pages as per previous chapter.

Below is the reference for each parameter:

N - Number of ads to display. Valid values are 1-9.

Optimal values are 1-4. Because ads presented in a single row, using the high number of ads may stretch the content page to which the template with the code is linked to.

T - Type of ads to display. Valid values are 1-8.

1 - Display newly posted ads.
2 - Display latest Hot ads.
3 - Display latest Editor's pick ads.
4 - Display Randomly selected ads.
5 - Display Random Hot Ads.
6 - Display Random Editor's pick ads.
7 - Display latest Hot and Editor's pick.
8 - Display Random Hot and Editor's pick.

A special note for MS Access database: The routine for random ads is simulated. It might not be as "ramdom" as with MySQL or MSSQL database.

I - Image Attachments. Valid values are 0 0r 1.

1 - Display image.
0 - Hide image.

C - Category Level. Valid values are 0-3

0 - Do not use category filter. Ads would be pulled from all categories depending on a parameter T only.
This value may be used within a template for linking to any of the 5 content pages.

1 - Pull ads based on category at main, first level. Main category determined automatically. Example: The code (which has C configured as 1) was inserted into a template and it was linked to viewscat.asp page. Every time this page used to pull subcategories for some main category, ads, which belong to that current main category, displayed at the top of the page.
This value may be used within a template for linking to any of the 5 content pages.

2 - Pull ads based on subcategory. Subcategory level is determined automatically. Example: The code (which has C configured as 2) was inserted into a template and it was linked to viewad.asp page. Every time this page used to display an ad, which belongs to some subcategory, other ads, which belong to that same subcategory, also displayed at the top of the page.
This value may be used within a template for linking to viewsublist.asp, viewlist.asp and viewad.asp.

3 - Pull ads based on 3-rd level category. 3-rd level category is determined automatically. Example: The code (which has C configured as 3) was inserted into a template and it was linked to viewad.asp page. Every time this page used display an ad, which belongs to some 3-rd level category, other ads which belong to that 3-rd level category also displayed at the top of the page.
This value may be used within a template for linking to viewsublist.asp and viewad.asp.

D - Default to parent category. Valid values are 0 or 1.

1 - Force ads display. If no ads are found at certain category level, then if:

parameter C is set to 2 or 3 - the routine would first probe the main category for ads and display them if found. If no ads found at main category, would try to pull ads belonging to any category according to the parameter T

parameter C is set to 1 - If no ads found at main category the routine would try to pull ads belonging to any category according to the parameter T

0 - Do not force ads display. If no posted ads found at certain category level (specified within the parameter C), nothing would be displayed.

Note: This parameter is irrelevant if C is set to 0.

Use parameter C according to the recommendations above! If you for instance use parameter C configured as 3 in a template linked to the viewscat.asp page, then the code routine would automatically trigger parameter C to 0 and pull ads which belong to any available category using parameter T only because viewscat.asp page cannot be used at 3-rd level category.

Exercise a common sense while combining parameters T, C and D. That is link templates containing code with parameter T set for low expectation result to higher category level (parameter C) to avoid excessive processing if parameter D is enabled (set to 1) and to prevent "no output" if parameter D is disabled. This would become obvious with high number of overall categories and fairly low number of posted ads. Consider the following:

Configuration NTICD as 23131 would mean pulling Editor's pick ads posted at 3-rd level category. Linking template with this code to viewad.asp page might result in constant default to higher level (1 or 2 addition automated query processing) in search of the available ads because most likely not every 3-rd level category would have editor's pick ads (low expectation result).

Configuration NTICD as 23130 might bare no result at all for the same reason as above and because default to parent category is disable (D set to 0).

For the example above it would be best to link random Editor's pick ads at Main category level (with option to default just in case) NTICD – 26111 or better yet make them category independent NTICD – 26100

Examples of Code

:AD=38121: - randomly pull 3 Hot or Editor's pick ads with images, from subcategory to which the content of the linked page currently relates. If no Hot or Editor's pick ads found in current subcategory, try to default to the main category to which the current subcategory belongs. If still no ads found, try to pull any random Hot or Editor's pick ads. Appropriate pages for linking the template with this sample code are: viewsublist.asp, viewlist.asp, viewad.asp

:AD=21010: - pull 2 latest ads without images based on a relevancy of the page content to the main category. If no ads found at current main category, then do not display anything. The template with this code may be linked to any of the 5 content pages.

:AD=45100:- randomly pull 4 Hot list ads with images from any category. The template with this code may be linked to any of the 5 content pages.

Note: Parameters C and D are automatically converted to 0 on a template preview page because preview page by itself does not have any relations to categories.

©2003-2010  Rapid Classified v3.3  GA Soft