Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
adding custom tag
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mou...@gmail.com  
View profile  
 More options Apr 25 2008, 5:30 pm
From: mou...@gmail.com
Date: Fri, 25 Apr 2008 14:30:29 -0700 (PDT)
Local: Fri, Apr 25 2008 5:30 pm
Subject: adding custom tag
I was curious, can you please provide me guidance as to how I would
add a custom tag to the toolkit v 1.4?

I'd like to add a few custom tags that are used in my code, including
'@todo' which specifies functions that need more completion etc.
thanks


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Mathews  
View profile  
 More options Apr 27 2008, 6:32 am
From: Michael Mathews <micm...@gmail.com>
Date: Sun, 27 Apr 2008 11:32:39 +0100
Local: Sun, Apr 27 2008 6:32 am
Subject: Re: adding custom tag
Hello,

This is a frequent question and one I don't think I've ever explained  
adequately, so thank you for asking it. (I think I will create a wiki  
page on this topic, based on this post in the future.)

There are two parts to using custom tags. The first part is easy:  
adding the custom tag to your doclet. For example if you wanted to  
use a @flavor tag, simply go ahead and do so.

/**
  * @constructor
  * @flavor chocolate
  */
function IceCream() {

}

The second part can be as simple or complex as you wish to make it:  
displaying the custom information in your output. This requires you  
to handle the custom tag information in your template.

NOTE: This part is different from version 1 to version 2, but you  
asked about version 1.4 so I'll give examples that will work with  
version 1, using the "sunny" template.

<h2>Flavors</h2>
<ul>
<for each="flavor" in="thisClass.doc.getTag('flavor')">
     <li>{+ flavor +}</li>
</for>
</ul>

Notice that I must treat the result of getTag() as an array. Even if  
you only have one of a tag, it's possible you might later decide to  
have two or more of those tags in a single doclet. For that reason  
getTag() always returns an array, sometimes it just happens to be an  
array of one.

If you want to ignore multiple tags, you can only use the first one:

<if "thisClass.doc.getTag('flavor').length > 0">
     Flavor: {+ thisClass.doc.getTag('flavor')[0] +}
</if>

That is a very brief introduction but should get you started. Feel  
free to ask more specific questions if you need to.

Regards,
Michael

On 25 Apr 2008, at 10:30, mou...@gmail.com wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google