Make ?view param follow you to parent / children
This commit is contained in:
		
							parent
							
								
									6d8fc799c0
								
							
						
					
					
						commit
						884b1a1aa5
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -27,8 +27,9 @@ p | ||||||
|     <h2>{{album.title}}</h2> |     <h2>{{album.title}}</h2> | ||||||
|     <p>{{album.description}}</p> |     <p>{{album.description}}</p> | ||||||
|     {% set parent=album.parent() %} |     {% set parent=album.parent() %} | ||||||
|  |     {% set viewparam = "?view=list" if view == "list" else "" %} | ||||||
|     {% if parent %} |     {% if parent %} | ||||||
|     <h3>Parent: <a href="/album/{{parent.id}}">{{parent.display_name}}</a></h3> |     <h3>Parent: <a href="/album/{{parent.id}}{{viewparam}}">{{parent.display_name}}</a></h3> | ||||||
|     {% else %} |     {% else %} | ||||||
|     <h3>Parent: <a href="/albums">Albums</a></h3> |     <h3>Parent: <a href="/albums">Albums</a></h3> | ||||||
|     {% endif %} |     {% endif %} | ||||||
|  | @ -37,7 +38,7 @@ p | ||||||
|     <h3>Sub-albums</h3> |     <h3>Sub-albums</h3> | ||||||
|     <ul> |     <ul> | ||||||
|         {% for sub_album in sub_albums|sort(attribute='title') %} |         {% for sub_album in sub_albums|sort(attribute='title') %} | ||||||
|         <li><a href="/album/{{sub_album.id}}">{{sub_album.display_name}}</a> |         <li><a href="/album/{{sub_album.id}}{{viewparam}}">{{sub_album.display_name}}</a> | ||||||
|         </li> |         </li> | ||||||
|         {% endfor %} |         {% endfor %} | ||||||
|     </ul> |     </ul> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue