Ticket #355 (closed enhancement: fixed)

Opened 3 months ago

Last modified 1 month ago

Problem with Layout Folders, when calling setView(), it will grab the first match instead of the right folder.

Reported by: sullah Assigned to: lmajano
Priority: high Milestone: 2.6.0
Component: Layouts & Views Version: 2.5.2
Severity: normal Keywords: layout views
Cc: sullah

Description

http://forums.coldboxframework.com/index.cfm?event=ehMessages.dspMessages&threadid=31916645-FF65-CEF6-658BC70A9E11B12F&#top

Problem with Layout Folders
02/19/08 6:00 AM

There is a problem with the way Layout Folders are matched to view names in the setView method of the requestContext object. The match is made with a simple findNoCase so, say you have some layouts defined for the following folders: "admin" and "min", the findNoCase will match any view that has the string "min" in its name.

This also causes problems if you want a different layout for subfolders like "admin" and "admin/popups".

A better way of matching layout folder keys is needed.

Martin

Change History

02/19/08 06:27:37 changed by sullah

http://forums.coldboxframework.com/index.cfm?event=ehMessages.dspMessages&threadid=316F804A-FF65-CEF6-65B29F4F3A20A27D

Layout Folders could be smarter
02/19/08 5:23 AM

I love the Folder feature of ColdBox layouts. However, I think they could be even smarter. At the moment, say your views folder looks like this:

views
- - admin
- - - - popups

I would like to be able to specify different layouts for the admin folder and the admin/popups folder. This isn't possible at the moment because of the way the setView method works in the requestContext object. The for key in loop and simple findNoCase will match the first FolderLayout key (in the above case, "admin") and ignore the more specific "admin/popups".

This would be a nice enhancement and would turn this already nifty feature into a truly powerful one.

Martin

02/25/08 11:50:16 changed by lmajano

  • priority changed from normal to high.
  • status changed from new to assigned.
  • version changed from 2.5.1 to 2.5.2.
  • summary changed from Problem with Layout Folders to Problem with Layout Folders, when calling setView(), it will grab the first match instead of the right folder..

04/02/08 23:47:27 changed by lmajano

  • status changed from assigned to closed.
  • resolution set to fixed.

Copyright 2006 ColdBox Framework by Luis Majano