excellent, i was way off then with the things i was trying.
thanks alot
zac
Main Topics
Browse All Topicshow can i put a CFIF on my page so that if a link is clicked a CFINCLUDE is then displayed in the same page?
i have a blank page with six links down the side, as i click on each link i would like a different CFINCLUDE to be displayed. how can i do this?
the html is simple like this (styled with css)
<div id="header">Zac Wingfield</div>
<div id="topwrap">
<ul class="left_nav">
<li class="left_nav_li_1"><a href="aboutme.cfm">about me</a></li>
<li class="left_nav_li_2"><a href="testpage2.cfm">about
<li class="left_nav_li_3"><a href="testpage3.cfm">pictu
<li class="left_nav_li_4"><a href="testpage4.cfm">inspi
<li class="left_nav_li_5"><a href="testpage5.cfm">servi
<li class="left_nav_li_6"><a href="testpage6.cfm">links
</ul>
</div>
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
right i might need a bit more guildance with this please. i have played around a little but the best i can do is to get the include page to open but not within the index.cfm. here is my code:
the following code is all on my index.cfm in exactly this order.
<div id="header">Zac Wingfield</div>
<div id="topwrap">
<ul class="left_nav">
<li class="left_nav_li_1"><a href="aboutme.cfm?page=abo
<li class="left_nav_li_2"><a href="page.cfm?page=abouty
<li class="left_nav_li_3"><a href="page.cfm?page=pictur
<li class="left_nav_li_4"><a href="page.cfm?page=inspir
<li class="left_nav_li_5"><a href="page.cfm?page=servic
<li class="left_nav_li_6"><a href="page.cfm?page=links"
</ul>
</div>
<cfif url.page eq "aboutme">
<cfinclude template="aboutme.cfm">
<cfelseif url.page eq "aboutyou">
<cfinclude template="aboutyou.cfm">
<cfelseif url.page eq "pictures">
<cfinclude template="pictures.cfm">
<!--- add in more cfelseif for more pages--->
<cfelse>
<p>whats this supposed to be in here???</p>
</cfif>
i'm a bit confused by the use of the word 'page' should i be chnaging that word to ..... ?
so your index.cfm has some content in now. somewhere on that page is where you will put the cfinclude to display your content, simply replace the existing cfinclude with the cfif switch I posted.
SO your index.cfm looks like this:
<cfparam name="url.page" default="">
<div id="header">Zac Wingfield</div>
<div id="topwrap">
<ul class="left_nav">
<li class="left_nav_li_1"><a href="index.cfm?page=about
<li class="left_nav_li_2"><a href="index.cfm?page=about
<li class="left_nav_li_3"><a href="index.cfm?page=pictu
<li class="left_nav_li_4"><a href="index.cfm?page=inspi
<li class="left_nav_li_5"><a href="index.cfm?page=servi
<li class="left_nav_li_6"><a href="index.cfm?page=links
</ul>
</div>
<div id="bodyContent">
<cfif url.page eq "aboutme">
<cfinclude template="aboutme.cfm">
<cfelseif url.page eq "aboutyou">
<cfinclude template="aboutyou.cfm">
<cfelseif url.page eq "pictures">
<cfinclude template="pictures.cfm">
<!--- add in more cfelseif for more pages--->
<cfelse>
<p>This is your home page content that is displayed when no url.page value exists.</p>
</cfif>
</div>
Business Accounts
Answer for Membership
by: mmc98dl1Posted on 2007-10-23 at 19:39:47ID: 20136002
I would suggest you change your links to be
e">about me</a></li> ou">about you</a></li> es">pictur es</a></li > ation">ins piration</ a></li> es">servic es</a></li > >links</a> </li>
<div id="header">Zac Wingfield</div>
<div id="topwrap">
<ul class="left_nav">
<li class="left_nav_li_1"><a href="page.cfm?page=aboutm
<li class="left_nav_li_2"><a href="page.cfm?page=abouty
<li class="left_nav_li_3"><a href="page.cfm?page=pictur
<li class="left_nav_li_4"><a href="page.cfm?page=inspir
<li class="left_nav_li_5"><a href="page.cfm?page=servic
<li class="left_nav_li_6"><a href="page.cfm?page=links"
</ul>
</div>
Then in you page.cfm in the appropriate place within the HTML:
<cfif url.page eq "aboutme">
<cfinclude template="aboutme.cfm">
<cfelseif url.page eq "aboutyou">
<cfinclude template="aboutyou.cfm">
<cfelseif url.page eq "pictures">
<cfinclude template="pictures.cfm">
<!--- add in more cfelseif for more pages--->
<cfelse>
<p>Home page content</p>
</cfif>