I'd like to create a bit of documentation for NAT
Macarro - November 3, 2009 - 10:17
| Project: | Node Auto Term [NAT] |
| Version: | 6.x-1.1-beta3 |
| Component: | Documentation |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Hi.
I've recently created a little function for themers using NAT wich can output terms by vocabulary in three different ways:
- Plain text
- Term link
- NAT link
Links are created with URL alias if they are defined. Since it's my first "serious" code and I haven't seen any php snippet with the same functionality I'd like to share it. Is there any kind of project for NAT documentation?
Kind regards.
PS.- Here is a little example of use:
In your theme you put:
<p><strong>Plain text:</strong> <?php print phptemplate_vterms($node, 8, FALSE, FALSE);?></p>
<p><strong>Term link:</strong> <?php print phptemplate_vterms($node, 8, TRUE, FALSE);?></p>
<p><strong>NAT link:</strong> <?php print phptemplate_vterms($node, 8, TRUE, TRUE);?></p>...and you get
<?php
<p><strong>Plain text:</strong> <span class="term">Half life 2</span>, <span class="term">Half life 2 - Episode one</span>, <span class="term">Half life 2 - Episode two</span>, <span class="term">Portal</span>, <span class="term">Team fortress 2</span></p>
<p><strong>Term link:</strong> <a href="/categoria/juego/half-life-2">Half life 2</a>, <a href="/categoria/juego/half-life-2-episode-one">Half life 2 - Episode one</a>, <a href="/categoria/juego/half-life-2-episode-two">Half life 2 - Episode two</a>, <a href="/categoria/juego/portal">Portal</a>, <a href="/categoria/juego/team-fortress-2">Team fortress 2</a></p>
<p><strong>NAT link:</strong> <a href="/juego/portal">Half life 2</a>, <a href="/juego/half-life-2">Half life 2 - Episode one</a>, <a href="/juego/half-life-2-episode-one">Half life 2 - Episode two</a>, <a href="/juego/half-life-2-episode-two">Portal</a>, <a href="/juego/team-fortress-2">Team fortress 2</a></p>
?>