Purl and / or space?

My site should have a section for regular users, a section for managers and a section for use only by anonymous visitors. Each section of the site requires changes in Drupal settings to use a different theme, changes to primary and secondary links, changes that are used in blocks, etc. In other words, user experience varies significantly from section to section.

Perhaps I could do what I need using Drupal multisites, a common database, and using settings.php to override the variables I need (for example: menu_primary_links_source). However, to make things more manageable in terms of operational activities and to buy flexibility, I am considering using the PURL API (purl.module) to prefix URLs for specific sections of the site, as well as to make my theme and custom modules respond to according to the current PURL prefix.

Before I begin, I want to not discount Spaces.module. The spaces use PURL, Features and Context (which I also use for my site). I don’t quite understand how exactly the gaps fit into the picture. Would it help me to create different sections of the site, each of which has a specific configuration and behavior? Or is it better for me to directly fit into the PURL API?

+7
drupal drupal-6
source share
3 answers

Spaces-PURL-Contextual Puzzle. Fun. I was going to write this long style to finish wrapping around it.

What are spaces?

Spaces is a module that creates redefined configuration containers for your site. This does not apply specifically to functions, this is about any number of configuration values ​​that can work with spaces, including function activity or not. (Active does not mean that the module is disabled, just a few function-oriented objects have been deleted, for example, content types and object-oriented views.

When using spaces, you need to decide what type of buckets you want to use. Open Atrium uses OG and User-shaped buckets, you need a new kind of bucket based on the user role. For the sake of sanity, you may need to create a separate module to define user roles as a more specific thing in Drupal, such as how Spaces OG should rely on organic groups for a number of concepts.

What is context?

Context is, ultimately, a page layout engine. You talk a little about the page, it changes the page accordingly. The context cannot change the URL, it is the other way around. Functions define Contexts in order to tell the site how to render this page unambiguously for this function; there is no direct connection between Context and Spaces or Context and PURL.

What is PURL?

PURL is a way of pasting things into a URL and storing them there until you are done with them.

How are these glues together

PURL-integrated spaces are launched based on one of two things: URLs or something about the content on the page. To explain this, I use Spaces OG as an example.

  • You click the link. The link was previously created by the PURL component, which Spaces OG monitors for tips. If this fragment of the URL makes sense for spaces, Space is triggered.
  • All links, except those that exclude PURL modification, save the PURL URL element, which means that the space is happy, and restarts with every page load.
  • Spaces OG knows how to check nodes for their group membership. If spaces can open a node file and find a group, it will launch that node Space using a modified version of PURL drupal_goto() to redirect the entire page to URL consistency. This will lead to overcoming any existing URL structure.
  • If the URL component is missing and the node does not have a group membership, the space does not start.

As soon as the Spacebar starts, all Spaces configuration values ​​are brought into the game. This will mean the default defaults (you can have several Space default configurations for each Space type) overlay the Drupal default values, which, in turn, are overridden by any configuration saved specifically for Space. In the case of Open Atrium, this includes such nice things as group color, toolbar blocks, and included features.

If the user navigates to something provided by Feature-a Node, view, etc., any Contexts associated with this Node, this view, this URL that any module can provide, can simply be called, and start Do something with blocks and tags to customize the page for Feature Content.

Next steps

As I mentioned above, it sounds to me as if your first step is to try to take a look at Spaces OG and rewrite it to focus on the user's role instead of organic groups. You do not need to do much with PURL, except for a small copy and paste from Spaces OG. You might want to post Spaces on the release line to take a swim with this idea, where people around you can see it and give pointers.

+6
source share

The way I understand the spaces module is this:

It provides an opportunity for a module of functions (and your "functions" created from this) to integrate and be available in certain areas of your site. Package Includes: Organic Groups, Taxonomy, and Users. There is an API to define more “spaces” than this.

So, for example, you can create a “function” (with a module of functions) of the image gallery. Using spaces with organic groups, you can be able to enable and disable each group, and it will be available only in this "space" (in this case, the group).

On the organic groups page:

Groups get their theme, language, taxonomy, etc. Integrates well and depends on the Views module

So, in your situation, you could think of spaces to make more flexible organic groups. As NoParrots said, OpenAtrium ( http://openatrium.com/ ) is heavily dependent on components / spaces / context modules, so this can be a good place to review how these modules work together.

EDIT:

I found a great video that could explain the situation more clearly: http://www.archive.org/details/TheHeartOfOpenAtriumContextPurlAndSpaces_782 . Around 4 p.m. he begins to talk about PURL.

On this page (below the video) there is also an explanation of PURL / Context / Spaces, which I think is pretty good:

  • Context is a module for triggering reactive behavior as part of a page load. Block visibility controls, trail menus, page classes, and page template templates are examples of things that fall into its jurisdiction.
  • PURL is a library for capturing and abstracting query processing, which goes beyond the fact that the Drupal main menu system provides ($ _GET ['q']). The discovery of query components, such as a subdomain, path prefix, user agent, or file extensions and support for their presence is its main role.
  • Spaces are a generic configuration override structure. The theory allows you to "tune everything for anything." In practice, it allows things such as a custom color group and features for each dashboard user and multi-site use of a single Drupal installation.
+1
source share

I would suggest using spaces or organic groups. The spaces were significantly used in the Open Atrium ... Intranet development kit for development. The intranet really requires the concept of access control and the visibility of functions depending on which department or role you have, so I'm sure Spaces will be very good for you.

Of course, there are venerable Organic Groups. Spaces are a higher level concept than PURL. Spaces use context and BTW PURL modules. My gut instinct is for using spaces or organic groups.

There are several videos online that talk about Spaces. Check them out.

0
source share

All Articles