Rhtml is template to generate html via ERB. It is composed by ruby code to control the html generation and html fragment.
Rhtml can include another Rhtml file by embedding <!-- include(RHTML_PATH) -->.
It is better to generalize included Rhtml file (Rhtml component). Because it can reduce maintenance cost of the system.
Because each include clause is naively replaced by other Rhtml component, some variables could be overwritten in other components. To cope with that situation, save_var and restore_var method is provided to save and restore variables. Therefore, it is better to call save_var in the first of component and call restore_var in the last of component. save_var and restore_var uses stack internally, so please call them in reverse order.