Topic: php to CF navigtation help!! (please don't laugh!!


tanam    -- 10-25-2007 @ 5:01 PM
  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
  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
  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
  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
 

<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
  excellent!  

good suggestion, will do.

thanks again!


mquack    -- 10-25-2007 @ 5:45 PM
  You're welcome.  By the way, welcome to EasyCFM.  Smile


www.rachelqueensg.com
Amazon Wish List


tanam    -- 10-25-2007 @ 5:48 PM
  thanks!  seriously nice to be here...

have a great day!


EasyCFM.COM ColdFusion Forums : http://archive.easycfm.com/forums
Topic: http://archive.easycfm.com/forums/viewmessages.cfm?Forum=27&Topic=12533