rev 1170
(3 files, 9kb)
+ Added a welay object that can be used to do method chaining on template layers/blocks. Use wetem::get() to get the default layer, or ::get('something') to retrieve the 'something' layer or block. Then you can chain ->append('new_block')->wrap('new_layer') methods on it. (Subs-Template.php)
+ welay supports the following methods, which are all shortcuts to other wetem methods: parent() (will return the parent object), append() (add items to current), prepend() (add items at the beginning of the current), before/after/erase (add items before/after/in place of current), replace() (add items in place of current layer, but leave its sub-layers inatct), remove/rename() (remove/rename layer/block), and wrap()/inner() which will respectively add a layer around the current, or at the top level inside the current. (Subs-Template.php)
* Renamed 'replace' to 'erase' in the ::layer() function, because that was the equivalent in ::load(). (Subs-Template.php)
* ::find_parent() is now a public method. I don't think it's going to hurt anyone anyway... (Subs-Template.php)
- Removed reference to #ic_recentposts, now unused. (index.rtl.css)
* Simplified unextends code in CSS parser. Basically, 'unextend' was an accepted keyword and it was a bit confusing. Now, only 'unextends' will be accepted. Also using word boundaries to make the regexp simpler. (Class-CSS.php)
@ To Pete: much of this is untested, I'm afraid, although it works for the regular uses in Wedge itself... Please analyze the object (and diff) carefully and make sure to tell me if anything looks wrong!
(3 files, 9kb)
+ Added a welay object that can be used to do method chaining on template layers/blocks. Use wetem::get() to get the default layer, or ::get('something') to retrieve the 'something' layer or block. Then you can chain ->append('new_block')->wrap('new_layer') methods on it. (Subs-Template.php)
+ welay supports the following methods, which are all shortcuts to other wetem methods: parent() (will return the parent object), append() (add items to current), prepend() (add items at the beginning of the current), before/after/erase (add items before/after/in place of current), replace() (add items in place of current layer, but leave its sub-layers inatct), remove/rename() (remove/rename layer/block), and wrap()/inner() which will respectively add a layer around the current, or at the top level inside the current. (Subs-Template.php)
* Renamed 'replace' to 'erase' in the ::layer() function, because that was the equivalent in ::load(). (Subs-Template.php)
* ::find_parent() is now a public method. I don't think it's going to hurt anyone anyway... (Subs-Template.php)
- Removed reference to #ic_recentposts, now unused. (index.rtl.css)
* Simplified unextends code in CSS parser. Basically, 'unextend' was an accepted keyword and it was a bit confusing. Now, only 'unextends' will be accepted. Also using word boundaries to make the regexp simpler. (Class-CSS.php)
@ To Pete: much of this is untested, I'm afraid, although it works for the regular uses in Wedge itself... Please analyze the object (and diff) carefully and make sure to tell me if anything looks wrong!