EasyCFM.COM ColdFusion Forums / PHP to CFML / php to CF navigtation help!! (please don't laugh!!

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: php to CF navigtation help!! (please don't laugh!!

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

tanam
10-25-2007 @ 5:01 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 5
Joined: Oct 2007

Hello there!

I am currently moving 150 websites with php navigation to a cf environment and am CLUELESS about how to create a simple nav with stay states.  Any ideas on how I could build something in CF that would have this same functionality?  Or where I might be able to look for guidance?  Maybe I just need a simple java script?

Thank you in advance for your help and honest attempts to hold back your laughter!

<ul>
     <li><a href="#"<?php if( $section == "home") { ?> class="active"<?php } ?>>About Julie</a></li>
     <li><a href="#"<?php if( $section == "research") { ?> class="active"<?php } ?>>Research & Publications</a></li>
          <?php if( $section == "research") { ?>
          <div id="subnav">
          <ul>     
               <li><a href="#"<?php if( $subsection == "film") { ?> class="active"<?php } ?>>Film</a></li>
               <li><a href="#"<?php if( $subsection == "research") { ?> class="active"<?php } ?>>Research</a></li>
               <li><a href="#"<?php if( $subsection == "publications") { ?> class="active"<?php } ?>>Publications</a></li>
          </ul>
          </div>
          <?php } ?>
     <li><a href="#"<?php if( $section == "media") { ?> class="active"<?php } ?>>Media</a></li>
          <?php if( $section == "media") { ?>
          <div id="subnav">
          <ul>     
               <li><a href="#"<?php if( $subsection == "television") { ?> class="active"<?php } ?>>Television</a></li>
               <li><a href="#"<?php if( $subsection == "radio") { ?> class="active"<?php } ?>>Radio</a></li>
               <li><a href="#"<?php if( $subsection == "print") { ?> class="active"<?php } ?>>Print</a></li>
               <li><a href="#"<?php if( $subsection == "web") { ?> class="active"<?php } ?>>Web</a></li>
          </ul>
          </div>
          <?php } ?>

     <li><a href="#"<?php if( $section == "teaching") { ?> class="active"<?php } ?>>Teaching</a></li>
     <li><a href="#"<?php if( $section == "events") { ?> class="active"<?php } ?>>Events</a></li>
     <li><a href="#"<?php if( $section == "contact") { ?> class="active"<?php } ?>>Contact</a></li>
</ul>

mquack
10-25-2007 @ 5:14 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1544
Joined: Jan 2005

The ColdFusion equivalent of

<li><a href="#"<?php if( $section == "home") { ?> class="active"<?php } ?>>About Julie</a></li>


would be

<li><a href="#"<cfif section IS "home"> class="active"</cfif>>About Julie</a></li>


Hope that helps.


www.rachelqueensg.com
Amazon Wish List

tanam
10-25-2007 @ 5:35 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 5
Joined: Oct 2007

Would it be weird if i said i love you?!?  Smile

THANK YOU!!!!!  I really appreciate your help...

tanam
10-25-2007 @ 5:37 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 5
Joined: Oct 2007

oh, one more thing before i go jumping for joy...

how do we assign the variable to the pages?

thank you!!!

mquack
10-25-2007 @ 5:40 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1544
Joined: Jan 2005


<cfset myVariable = "value" />


Be sure to check out the tutorials section of EasyCFM, as well as the Forum Guidelines and the Adobe ColdFusion LiveDocs.  All of those have a ton of resources that will help you with the basics (like setting variables).

www.rachelqueensg.com
Amazon Wish List

tanam
10-25-2007 @ 5:42 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 5
Joined: Oct 2007

excellent!  

good suggestion, will do.

thanks again!

mquack
10-25-2007 @ 5:45 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1544
Joined: Jan 2005

You're welcome.  By the way, welcome to EasyCFM.  Smile


www.rachelqueensg.com
Amazon Wish List

tanam
10-25-2007 @ 5:48 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 5
Joined: Oct 2007

thanks!  seriously nice to be here...

have a great day!


Website Designed and Developed by Pablo Varando.