tqExpert Help


You use the content tqTag to enable tqAdmins (with suitable permissions) to specify and update text content (and associated graphic content) in Website pages.  In addition, content enables you to display search results. The many parameters and local variables allow for varied implementation options.

content - Syntax

<tqtag name="objectNametype="contenttitle="caption for the usermaxItems="1" [dynamicGrow] [itemsPerRow="2"] [rowDelimiter="tr"] [alternativeTag="loginBoxAlternativealternativeCondition="isAuthRequired"] [pageMainContent] [pageSearchResults] [pendingTag="content0"] >

content - Parameters

Parameter Name Type Mandatory Strict | Transitional Case-
type Text + S + must be content
name Text + S + should be unique tqtag name in the template. no spaces/commas/single quote/double quotes allowed
title Alpha Numeric + S - The title of the tqtag. This title will be presented only at the back-end system.  no spaces/commas/single quote/double quotes allowed
additionalFieldsContentItems - T +  using parent content item additional fields to get current items, must provided with the contentTag property (to use with tqtag single mode only, will not work in dynamic grow)
alternativeTag Text + S + Specify a case declared within the alternative tqTag.
alternativeCondition Text + S + (optional, if the condition is specified within the alternative tqTag) Indicate a condition for the case that you are specifying. Use one of the values described for this field under alternative.
contentTag - S + if additionalFieldsContentItems is used, contentTag tells form what tqTag to take the additional fields (to use with tqtag single mode only, will not work in dynamic grow)
dynamicGrow   - T + dynamicGrow tells the system to copy the content tqtag for each item retrieved maxItems numbers of times.
itemsPerRow Number - S   Number of items to show before adding the rowDelimiter
Number - S The max number of items to display in a page
pageMainContent   - T + pageMainContent is used to display the item in the url.
pageSearchResults   - T + pageSearchResults is used to display the search results items
pendingTag Alpha Numeric - S + pendingTag tells the system to execute the current content tag only after the pendingTag executed, even if it is defined before the pendingTag in the template.html file 
rowDelimiter Text - S  + HTML tag to  add after itemsPerRow (e.g. rowDelimiter="tr" or rowDelimiter="ul") the system will close and open the rowDelimiter tag everytime itemsPerRow reached.
useSpecificItems - S + tells the system to take specific content items ID (for use in the tqExpert only and not to allow the tqAdmin to define items, good use for automation process) - to use in single mode only

content - Local Variables

Name Type Size Description
addDate datetime   The datetime the section was created or last modified. can be formated using @addDate@df:[format]!
adminID int 5 The userID of the tqAdmin who created/edited the content
admin[columnname] text ~ Properties of the tqAdmin who created/edited the content (fName, lName, email, etc.)
author text 50 Content Author - free text (not taken from the tqAdmin list) 
content text 65535 Item's content
counter int 6 Running number from 1 to n represent the place of the item in the retrieved item list
description text 65535 Short description of the item
edited text y or n 
editor number 4 The userID of the tqAdmin who approved the content to be published. The syntax to get the editor information is @editor@:[property name]! (e.g. @editor@:fName! )
endDate datetime    The last  date-time the item will be shown online.  Can be formated using @endDate@df:[format]!
evenOrOdd text even or odd 
id number 12 content database id
image text ~200 The url to the content image
itemPosition number Running number from 1 to n represent the place of the item in the entire retrieved items including items in other pages. (counter will only count the items in the current page)
itemSource text 180 name of the source the item came from (from sources module)
itemTemplateID number In case a specific template will be chosen for an item, this variable will hold that templateID
keywords text 65535 Item keywords as populated in tqTag Site Manager.
link text ~100 url to the item page in this order: item redirect, item virtual path, itemID
linkPrint text ~100 url to print page of the item
linkPrintCollective text ~100 url to pring page of the collective item and all of it's sub items
linkToParentItem text ~100 url to the collective item if applicable (only in pageMainContent mode)
linkToSectionRSS text ~100 link to rss feed for the current section
mainPic text 65535 Item main picture (the entire html img tag). Not as @image@ where it holds only the url to the item picture
metaDescription text 1024 Item description for search engines.
metaMsTheme text 3 on or off
metaRefresh number 3 The item refresh rate in second
metaTitle text 1024 Item title for search engines
numRaters number 6 Number of users rated the item
numViews number 6 Number of users viewed the item
parentItemTitle text 100 The title of the item parent (only incase of collective item)
quote text 65535 Item quote
redirectTo text 255 href to external/internal url 
score number 6 score item got in content search (apply only on search results) 
sectionAvatar text 1024 Item's section avatar - full HTML img tag
sectionID int 5 Item's sectionID 
sectionImage text 1024 Item's section main image - full HTML img tag
sectionLink text 1024 url to item's section page
sectionName text 180 Item's section name (title)
showOrder number 5 Represent the order number of the item in the section, this number is not a running number. if you are looking for the running numbers of items in the section use @counter@ or @ itemPosition@
sourceUrl text 1024 the source url the content of this item was taken from.
startDate datetime   The first date-time the item will be shown online.
sumRaters number 6 The total sum of the raters scores. to get average rating use @:sumRates@ / @numRaters@ 
title text 100 Item title
totalNumOfItems number 6 The total number of items in the retrieved items list.
useSSL text 3 on or off

content - Examples

Example 1 - very basic use of content tqtag without dynamicgrow
<tqtag name="objectNametype="contentmaxItems="1title="caption for the user" >

Example 2 - very basic use of content tqtag with dynamicgrow
<tqtag name="objectNametype="contentmaxItems="5title="caption for the user" >
    <div><a href="@link@">@description@</a></div>

Example 3 - very basic use of content tqtag with dynamicgrow
<tqtag name="objectNametype="contentmaxItems="5title="caption for the userdynamicGrow >
    <div><a href="@link@">@description@</a></div>

Example 4 - content tqtag with dynamicgrow and rows delimiters (based on template 77)
<tqtag name="content0type="contentmaxItems="999title="content item" dynamicGrow itemsPerRow="2rowDelimiter="tr" >
            <td valign="top"><div id="itemImage">
                <a href="@link@"><img src="@image@" alt="@title@" width="150" height="150" /></a>
            <td valign="top" align="right">
                <a href="@link@" ><b>@title@</b></a><br />


Example 5 - content tqtag for item's page that knows to display the content item for the pageMainContent feature (based on template 229)
<tqtag name="pageItemContenttype="contentpageMainContent >

Example 6 - basic use of content tqtag for search results
<tqtag name="content0type="contentmaxItems="10dynamicGrow pageSearchResults >
    <a href="@link@">@title@</a></div>

Example 7 - advanced use content tqtag for search results with text filtering and date format (based on template 364)
<tqtag name="content0type="contentmaxItems="10dynamicGrow pageSearchResults >
    <td><div class="itemTTL"><a href="@link@">@title@</a></div></td>
    <td><a href="?https://tqtag.comsection=249cl:filterQuery!&filterQuery=author='@author@'">@author@</a></td>
    <td><a href="?https://tqtag.comsection=249cl:filterQuery!&filterQuery=sectionID=@sectionID@">@sectionName@</a></td>
    <td><div class="itemText">@description@ <a href="@link@" class="readMore"></a></div></td>
    <td><a href="?https://tqtag.comsection=249cl:filterQuery!&filterQuery=DATE_FORMAT(tbl.addDate,'%d/%m/%Y')='@addDate@df:%d/%m/%Y!'">@addDate@df:%d/%m/%Y!</a></td>

Example 8 - tqtag with alternative condition - notice that the alternative tqtag must be before the content tqtag that calls him (based on template 453)
<tqtag name="loginBoxAlternativetype="alternative" >
    please login ... (login form maybe a good idea over here)

<tqtag name="mainContenttype="contentmaxItems="1title="mainPageContentalternativeTag="loginBoxAlternativealternativeCondition="isAuthRequired" >
    <div class="N11">@description@</div>
    <div class="txtHold">@content@</div>
    <div class="clear"></div>

for a list of alternatives please follow the available alternatives for this tqtag in this page

Example 9 - tqtag content that should run only after another tqtag has run with the pendingTag property (based on template 379)
<tqtag name="content1type="contentmaxItems="1title="run after some othertqtagdynamicGrow pendingTag="content0" >
<a href="@link@" class="higherPrice">Same specs; higher price</a>

content - tqoptions

Within the content tqtag you can use the following tqoptions: contentListOfPages , head, if, lastItemInRow, subItemNextPage, subItemPrevPage, subItemsInfo, tail, tooltip.
Related tqoptions used in other tqtags: contentListOfPages, nextContentPage, prevContentPage.

User Notes

  Add Note

Topic: content