Skip to:

Re: bpContents 0.1X Core Code – Dev Sneak Peek

Burt Adsit


Changes 0.18

– Pulled breadcrumbs and tag cloud out of the OCI_Container class. Made them independent template tags.

– Dropped the use of the OCI_TAG container type. Everything is either a container or an item. Tags and Categories can be simulated with out having them be explicit node types.

– Forcing containers used in templates to have a base path of some sort based on the context of the template. Profile containers would be /members/user. Group containers would be /groups/groupslug.

– Eliminated the url action vars to have a full path. /tag is used instead of /members/user/tag

– Containers, clouds and crumbs respond to two parts of the url. The ‘context’ part and the ‘parameter’ part

Ex: ‘’’ is tossed by bp as irrelevent trash. Which it is.

‘/members/user’ is the context found with oci_get_the_context() which returns a path string

‘/tag1/tag2’ are the parameters found with oci_get_the_context_parameters() which returns a path string

‘contents’ in bp is the $bp->current_component

‘browse’ is the $bp->current_action

By combining ‘context’ and ‘parameters’ we get the full container path in the tree ‘/members/user/tag1/tag2’.

– Fixed the new item and browse templates so that the breadcrumbs and cloud track properly.

– Fixed the new item ‘new container’ and ‘new item’ forms submit and redisplay, so that the path currently being viewed is redisplayed again.

– Added an ‘action’ parameter to the crumbs and cloud args list so that urls can be built properly based on the form they are in or where we want urls to link to. *browse* /tag1/tag2’

In the url above *browse* is the action that will be triggered in the component ‘contents’. It allows the next menu item to be chosen by the template when the cloud builds the tag links.

Skip to toolbar