EasyCFM.COM ColdFusion Forums / Coding Help! / i'm new, please help

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: i'm new, please help

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

tn
12-04-2002 @ 10:41 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 68
Joined: Dec 2002

I looked at the following code and dont really understand how to know if a section is 'Students', 'Resources' or School Info'.

Thanks for any explanation.

--- sample code ---


<tr>
        <td valign="center"><img src="#attributes.path#images/spacer.gif" border="0" width="20" height="14"></td>
        <td valign="center"><a class="nav<cfif attributes.section is "students">over</cfif>" href="#attributes.path#students/index.cfm">Students</a></td>
        <td valign="center"><img src="#attributes.path#images/spacer.gif" border="0" width="20" height="18"></td>
        <td valign="center"><a class="nav<cfif attributes.section is "resources">over</cfif>" href="#attributes.path#resources/index.cfm">Resources</a></td>
        <td valign="center"><img src="#attributes.path#images/spacer.gif" border="0" width="20" height="18"></td>
        <td valign="center" nowrap><a class="nav<cfif attributes.section is "school">over</cfif>" href="#attributes.path#school/index.cfm">School Info</a></td></tr>


Justice
12-10-2002 @ 8:42 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 36
Joined: Oct 2002

I'm unsure what you are asking, are you trying to find some way to assign a variable to the different pages, or to somehow check which page they are on???

Maybe you could include some code to show me what you are trying.  Smile

Some mistakes are just too much fun to make only once...

MvZ
12-10-2002 @ 1:32 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 4
Joined: Dec 2002

Hey,
If you look at the cfif part inside the <a class>(s), you'll notice
attributes.section

The attributes scope is used when you have a custom tag or you call an template using cfmodule, for eg.
I have a custom tag called getUser, which you call via
<CF_getUser section="student">
or <CFMODULE template="getUser.cfm" section="student">

Now inside the custom tag you'd have the attributes.section available.

Hope thats enough,
Cheers!
Marius

-= M =-

This message was edited by MvZ on 12-10-02 @ 1:32 PM


Website Designed and Developed by Pablo Varando.