Author Topic: Category Specific, Tag Specific Text Link Blocks  (Read 1252 times)

0 Members and 1 Guest are viewing this topic.

Offline a4evermedia

  • Global Moderator
  • Full Member
  • ***
  • Posts: 122
  • Karma: +25/-0
  • Gender: Male
    • View Profile
    • A4Ever Media
Category Specific, Tag Specific Text Link Blocks
« on: April 20, 2012, 10:44:18 AM »
Did you know that you can use the TubeX Banner function to easily add specific ( or random ) text-link blocks to your pages?

Just add your anchor tags and text into the banner html box.  Then use the {banner} function to select the code for display.

For instance, to select a text or text-link block based on the category value of your page, you would place this code where you want the block inserted.

{banner zone="Text Link Block" tags=$category.name}

This assumes that you have created a text-link block for each category you use.  If not, you can use conditionals to a choose default or random block for categories for which you have not yet created a text-link block.

Code: [Select]
<div id="textlinks">

{capture var=$banner}{banner zone="Text Link Block" tags=$category.name}{/capture}
         
   {if empty($banner)}
      {banner zone="Text Link Block" tags="default" sort="`times_displayed` ASC"}
   {else}
      {banner zone="Text Link Block" tags=$category.name sort="`times_displayed` ASC"}
   {/if}

</div>

This assumes that you have at least one text link block tagged with default.

Please post your requests for customizing this code.
« Last Edit: October 12, 2013, 10:49:31 PM by a4evermedia »

Unofficial JMB Support Forums

Category Specific, Tag Specific Text Link Blocks
« on: April 20, 2012, 10:44:18 AM »


Tags:
 

Related Topics

  Subject / Started by Replies Last post
2 Replies
21327 Views
Last post July 15, 2012, 05:44:54 AM
by Dred
2 Replies
1522 Views
Last post July 16, 2012, 08:07:42 PM
by Dred
0 Replies
766 Views
Last post October 07, 2013, 04:37:56 AM
by scully
0 Replies
759 Views
Last post December 05, 2013, 10:56:55 AM
by Onyx
0 Replies
832 Views
Last post December 23, 2013, 09:40:04 AM
by punaniman