>> Use the component system. See my example code on the FOREACH thread,
>> or here 
>> <http://forum.trapexit.org/viewtopic.php?t=11291&sid=bd4ecf2f0188639e9da9efc6aa1c12d4
>>  > (although trapexit loses all of my intentation).
>>
>> To summarise, you want a controller function like this:
>>
>> foo(A, Args) ->
>>    [{ewc,sidebar,[A]},
>>     {data,whatever_data(Args)}].
> Does this mean that I will need to return {ewc,sidebar,[A]} from  
> every function of every controller?

No. You chopped off the important bit of his question:

> 3. Template inheritance:
> Using the html_container_controller.erl/html_container_view.et as the
> root-template, how do I reuse header, main-content, sidebar and footer
> from other components?

I read that to mean, "I am using the html_container controller and  
view to have a sidebar. But in some places I want to use those  
components in some other way". Maybe I read it wrong :)

If you just put it in your html_container, you don't need to do it  
anywhere else.

Is anyone interested in a fully working erlyweb reference app? Would  
that help? I have a tictactoe server that I wrote ages ago as an  
example for someone that doesn't use erlydb, but it does use erlyweb

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to