Ecpp-pages can embed other pages. These embedded pages are called subcomponents. They come in 2 variants: local and external. Local subcomponents are defined inside another component with <%def componentname> and closed with </def>. External subcomponents are normal components.
A subcomponentcall starts with <& and ends with &>. Insert the componentname between these tags. If you omit the library-part of the component, the current library is used. If the componentname is a single word, ecpp looks for a local component, which is called if found. Otherwise it is a external componentcall.
You can dynamically build componentnames, by putting a c++-expression inside brackets. This expression is evaluated on runtime and the resulting component is called. The expression can be of type (or convertable to) std::string, tnt::Compident or tnt::Subcompident.
After the componentname you can add named parameters. Put a name followed by '=' and a value. The value is either a constant string or a expression. A expression must be bracketed. If you want to pass just the same parameters your current component received, put the single word qparam into the list (actually you can pass any cxxtools::query_params-variable).
A special case are local components, which have c++-parameters. You can put a normal parameterlist just like in c++-functions after the defition (<%def>-block) after the componentname. The can only be called locally.
<& localcomp param1="value1" &>
<& localcomp param1="value1" &>
<& localcomp_p(5) &>
<& localcomp_p(5) >
<& subcomp param1="value1" &>
<& subcomp param1="value1" &>
<& extcomp@extlib param1="value1" &>
<& extcomp@extlib param1="value1" &>
<& extcomp.subcomp@extlib param1="value1" &>
<& extcomp.subcomp@extlib param1="value1" &>
<& (compname + '@' + libname) param1="value1" &>
<& (compname + '@' + libname) param1="value1" &>
<& (tnt::Compident(compname, libname)) param1="value1" &>
<& (tnt::Compident(libname, compname)) param1="value1" &>
<& localcomp param1=(1+5) qparam param2="uhu"&>
<& localcomp param1=(1+5) qparam param2="uhu"&>
<& localcomp param3="value1" param3="value2" param4="17" param4=(28) &>
<& localcomp param3="value1" param3="value2" param4="17" param4=(28) &> <%doc>callComp("extcomp@extlib", request, reply, qparam);
<{ callComp("extcomp@extlib", request, reply, qparam); }>