Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 818 Bytes

views_with_no_layout.md

File metadata and controls

30 lines (19 loc) · 818 Bytes

Views With No Layout

So what happens if I DO NOT want the view to be rendered within a layout? Am I doomed? Of course not, just use the same method with some extra parameters or event.noLayout() method:

component name="general"{

	function index(event,rc,prc){
	
		// call some model for data and put into the request collection
		prc.myQuery = getInstance('MyService').getData();
		// set the view for rendering
		event.setView( view="general/index", noLayout=true );
	
	}

	function index(event,rc,prc){
	
		// call some model for data and put into the request collection
		prc.myQuery = getInstance('MyService').getData();
		// set the view for rendering
		event.setView( view="general/index" ).noLayout();
	
	}

}

That's it folks! You use the noLayout=true argument or the noLayout() method.