Hi,
thanks for that fine modul.
It would be fine, if it would be possible displaying it inside a pane on a panels-page.
What do you think about a panels integration?
Best regards,
Ralf

CommentFileSizeAuthor
#15 ctools_contexts_03.patch6.07 KBxano

Comments

xano’s picture

Assigned: Unassigned » xano
Category: feature » support
Status: Active » Fixed

It's easy: create a block index and use that for your panel.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

hefox’s picture

Title: Panels integration for vocabindex » Ctools content_types integration for vocabindex
Category: support » feature
Status: Closed (fixed) » Active

Sorry for reopening, but there's room for more ctools intergration.

Ctools actually does have a vocabulary context (and using that can add a very basic listing of taxonomy, see ctools/plugins/content_types/vocabulary_context for the code of that).

It would be nice if vocabindex provided itself as configurable content_types that can be added to panels using the relationship to the vocabulary.

(For a use case, I made a vocabulary module http://github.com/hefox/vocabulary that provides a ctools overrideable vocabulary page, so if vocabindex provided it's displays that had vocabulary context, could use them on that page without needing to make a page per vocab, etc! :D ).

xano’s picture

Title: Ctools content_types integration for vocabindex » Ctools integration
Project: Vocabulary Index » Index
Version: 6.x-2.x-dev » 6.x-1.x-dev
Assigned: xano » Unassigned
Status: Active » Postponed (maintainer needs more info)

1) Vocabulary Index will no longer get new features. Moving this to Index instead. Postponed until it's clear if this feature is usable there.
2) I have no experience with Ctools at all, so you'll have to tell me what it does. From what I can see it provides a way to wrap entities in something general, similar to the indexEntity class currently used by index, which can then be used by other modules. Am I right?

hefox’s picture

The most I've done for developing something to be used by ctools was yesterday's vocabulary module, but I'll try to answer.

Ctools has contexts, which are like a node, a taxonomy term, some sort of describable specific thing with information associated with it.

Then it has content_types, which are types of content that can be added to things, like a block, view, etc.

The content_types can also use contexts, for example a content_type could be node_body with a required context of a node.

So for index,. then it could declare some content_types that take in context, for example taking in vocabulary to make a vocabulary display. Content_types can also have configuration settings for added control, I believe..

(haven't looked at index at all compared to vocabindex, which I actually only looked at the code only when deciding if it fit my needs before I made vocabulary -- then when I was done Ben asked about integration with vocabindex)

xano’s picture

Could you please take a closer look at Index and take another shot at bringing me the light? :-P I'm afraid I still don't quite the usefulness of Ctools (integration).

hefox’s picture

Hmm

The issue with just adding something as a block is that blocks have no context.

If index's displays are descried as configurable context_types that take in context and display based on the context.

For vocabulary, I could have x number of panels and would need x number of index blocks to display the index on my vocabulary panels; but if they were content_types I'd just need my one vocabulary page that has the index content added that takes in the context of vocabulary ID. (And then I could add other random stuff to my vocabulary page).

xano’s picture

It's pretty abstract and I think I still don't quite get it. Could you perhaps describe some use cases? My current understanding is that contexts allow you to have multiple instances of the same block with possible extra arguments. Correct?

hefox’s picture

Hmm, have you used panels? Anyhow, I'll try to explain but I'm not expert either.

In panels, you can have a node page template, which all node/% that pass various conditions will be displayed as. So for that panel variant, can add things like node body, cck fields, etc. to that panel as content. So when viewing the node, it knows to use the actual node that being viewed's body because it's been set to use the context of that node.

Another context, a user profile user/%. Can add a relationship/context to the user being viewed's content_profile, and then in the panel can add a node body to the user/% panel, using the relationship/context of user's content_profile and so the panel will display the user content_profile's body.

So I guss it's iis like havin the same block, but with arguments/context. Actually, a lot like that.

Like taking an argument in a view can be the same view/display, but changes based on the argument.

mlncn’s picture

Check out Panels 3 if you haven't looked at Panels in a while, as the main use case for CTools integration... with ever more people using it!

xano’s picture

I think I understand now. In the context (haha) of Index, what would be a good use case? So far blocks don't respond to their environment like your examples and Panels' project page. Or should it be used to expose Index blocks to other panels?

I don't have that much spare time to figure out with which modules Index might integrate, hence my questions for you. I hope you'll understand.

hefox’s picture

To panels they would not be blocks parsay, they'd be a type of content that can be added, and they be made in such a way to accept input, then call your theme/etc. functions to display based on the input.

Anyhow you're busy, I'm busy, and I don't actually have a use case for it ... yet (other than "that'd be cool" use case), so I say let it rest as opened and wait for someone that has time / use case for it; or for ben to try and explain further maybe?!

xano’s picture

Will do :) You made me curious :-P

xano’s picture

#700150: Pluggable contexts will make it easier to add Ctools integration in a later stage without having to change any code or to let contrib do that.

xano’s picture

Assigned: Unassigned » xano
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new6.07 KB

This is a first stab at what I hope will be a useful feature :P I must say I have only come to hate the lack of proper documentation more after trying to find out how to expose indexes as contexts. The example code lacks parameter documentation everywhere and info hooks or whatever they are need to return properties that aren't documented either. Also, the advanced help pages contain a lot of useless information (I actually typed unformation, which would fit very well in this situation if it would actually have existed) and cannot tell me just what basics are required to expose my stuff to Panels using contexts.

Bottom line: I'm going to need your help if this is going to get in.

xano’s picture

Assigned: xano » Unassigned