How to remove a tile in apache tiles for a specific view?

前端 未结 2 1536
小鲜肉
小鲜肉 2021-02-09 11:17

I want to know how to remove a tile from a view. My main view is looking like this

\"Main

2条回答
  •  难免孤独
    2021-02-09 12:01

    I don't konw if that is what You expect, but You can always add in Your tiles config, a reference to an empty file (first create one) - so the menu will dissapear:

    You can move menu td inside menu jsp, so the layout look simmilar to this:

            
    
    [...]
    
    

    Defs:

    
    [...]
        
    
    

    In the scenario given above, td with menu will not be presented, the same You can do for footer section.

    Another way is to make a definition and nest it into another definietion, this will result in nested templates also, then You can insert those custom templates like this (example from other project):

    
    
    
    
    
    
    
    
    
    
    
    
    
    

    As You can see above, You can inject other templates into main template as attributes - in this case, menu template is inserted into attribute called header.

提交回复
热议问题