On Jun 20, 2006, at 1:31 PM, Christian Cypert wrote:
I'm using the demo as a basis for our new web site. Having a bit of
an issue on a link. I have two circuits that are based out of the
same folder. When a user clicks on the Recent Estimate link in the
Sidebar the colorization of the link for the Estimate/Quote is
changed. Is this because they are both coming out of the same
directory, or did I just do something dumb? Hope that makes sense?
$fusebox{"circuits"}{"quote"} :=
"root/etraxx/members_only/quote"
$fusebox{"circuits"}{"estimate_list"} := "root/etraxx/
members_only/quote"
<li><a class="<%=$sidebarClasses{"quote"}%>" href="<%
=fusebox.makeURL($XFA_onQuoteMain)%>">Estimate/Quote</a></li>
<li><a class="<%=$sidebarClasses{"estimate_list"}%>" href="<%
=fusebox.makeURL($XFA_onEstimateListing)%>">Recent Estimates</a></li>
There are times when setting and passing $XFAs make sense, namely
when a given piece of code can be called from many different places
and the values of the $XFAs will be dynamic, and there are times when
it only serves to obfuscate. A side bar such as this seems to be one
of the latter. If you're declaring explicitly the $sidebarclass and
the label of the link on each line, why not declare the
circuit.action pair explicitly as well? You can't have one out of
three elements be variable in this situation.
Thus:
<li><a class="<%=$sidebarClasses{"quote"}%>" href="<%=fusebox.makeURL
("quote.main")%>">Estimate/Quote</a></li>
<li><a class="<%=$sidebarClasses{"estimate_list"}%>" href="<%
=fusebox.makeURL("quote.estimate_listing")%>">Recent Estimates</a></li>
... easier to read and debug, with zero loss of functionality or
portability.
Check the fbx_switch.a4d file in the "quote" folder, to be certain
that the above links are defined and substitute your actual values in
the code above.
I suppose you could have the same directory defined with two
different circuit names in fbx_circuits, but why?
Hope this helps!
--
Bart Alcorn
National Service Center
800-500-6421 x 2360
AIM/iChat: balcornnsc
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/