I am really eager to try out panels 3 node and taxonomy override features. I can't find out how to create separate overrides for different content types / nodes. Can somebody point me in the direction of a tutorial that can walk me through the process of doing this? The Panels 3 alpha 3 looks awesome!

Comments

merlinofchaos’s picture

Status: Active » Fixed

Short version: Select the Node view (or term view) and go to 'task handlers'. Select 'Panel' and choose add. Select a vocabulary or term in the selection criteria page, then continue on and make the panel normally. When done, select update and return or finish and you'll be back at the task handlers page. Repeat this for a different node type/vocabulary, and you'll see you have two task handlers. You can keep adding these for whatever criteria you need. Be sure to click save from the list of task handlers.

pyxio’s picture

Thanks! It works perfectly. Now I can create node overrides without a problem. However, the passing of arguments is still very perplexing. And I would like to contribute to the Drupal community. So once somebody walks me through the process of passing arguments and/or creating arguments in panels I will write up a nice tutorial that can be added to the Panels documentation. I'm a good technical writer and enjoy that work. So I think the best way forward would for a volunteer to guide me through the process of configuring some basic arguments and I will prepare this MUCH NEEDED tutorial. Any takers? Cheers, Kevin

merlinofchaos’s picture

Sure, I'll give you some basic pointers on that, since the doc's not written. Give me an idea of what you'd like to accomplish.

pyxio’s picture

Cool. I will write tutorials for as much as you will teach me. So let's start with some 101 basic tutorials. Some things I need to accomplish now would be a great place to start. Once I get them working I will prepare the tutorials. I will describe a few things I need to do which I think qualify as basic ... you may know of a couple others you'd like to see some documentation written up for and I'd be happy to work on those as well.

Anyway, obviously, the power of arguments is being able to present views in context to the subject matter. That subject matter can almost always be identified by the url. So here is my current situation and one that I think would make a nice premiere tutorial to a series a hope to write ...

I have created an information website about technology news in Los Angeles. At the heart of this site are technology companies in Los Angeles since they are the ones that generate the news. I have a number of vocabularies which are not important now but ultimately, it is a tag based site so regardless of the subject (vocabulary) you are interested in, by following tags you will find the companies and peoples making news in that space. For the first tutorial, what I would like to document is very simple. And I already have the views working, however I can't align the view arguments with the panel options. So what we need to do in this tutorial is ...

1. create a view that shows company profile information. this profile is created by defining fields from a node called Company (i know this already)
2. create a view that shows company new headlines. these headlines are defined by defining fields from a node called Tech News (i know this already)
3. create a panel page that puts both the company profile and headlines for COMPANY ABC on the panel page

the challenge: this must all be accomplished using vocabulary and terms filtered from the URL. i have the views working when i enter the arguments in preview but can't get them to pass through panels. So our first tutorial will be showing users how to create multiple views and combine those views on a single contextually relevant panel page using taxonomy arguments.

So what do you think? I will be happy to expound in more depth as far as requirements are concerned as needed. Thanks! Kevin

pyxio’s picture

so we will have for example node/% = company/mycompany and on that page will be mycompany profile and mycompany news headlines filtered through taxonomy. K

pyxio’s picture

here is an example url alias http://www.techtagz.com/profile/company/irise so you have some idea about the site structure. on that page should be only a profile for iRise but there are a bunch others as you can see. In addition to this site, I have far more complex needs on another which would make a nice segueway into the more advanced documentation. I'm looking forward to learning and documenting what I've learned! Cheers, K

pyxio’s picture

How shall we proceed with this? I'm ready to get started.

merlinofchaos’s picture

Sorry, you picked a hard one so I have to think about that to figure out a good answer and I haven't had enough time to put it all together. There may be a piece missing in order for you to do it, too, if you want to go from terms to company without actually specifying the company.

pyxio’s picture

maybe i am saying it wrong. the view already works using the preview argument filter. it is very basic actually. there are numerous companies profiles in the db. each company has their own node. the name of the company appears in the url company/%node where node is the title of the name of the company. so our panel at company/MyCo should show only the information for MyCo.

merlinofchaos’s picture

Also, &$sandbox is not documented at all.

pisco23’s picture

@iteego - hopefully this won't stray too far off topic.

I am missing a bit in understanding your process in #4 : how are you 'associating' the company headlines with the company(nodes)?

I have done something similar on a test site - actually pulling in various bits of info onto a sort of composite page. To achieve this simply I just used NodeReference module with views and panels. In your case the Company(node) would be the reference for your News item. This works if each item is being 'manually' added to the site. The NodeReference is just an additional CCK field to select (auto complete works well).

Then in views I set the argument to Content:NodeReference, providing a default argument and setting "Node ID from URL"

Then in panels in node/% (override) set the argument to Node ID to override certain Content Types only...(I was using panels 2, the terminology and structure appear a bit different in P3 - which is even more awesome!).

This receipe delivers (for me at least) what I call "composite pages" pulling together the main Node info, plus images, blogs, stories etc all referenced to the main Node.

As for searching my site, I use faceted search on my CCK fields - which means that I no longer use taxonomy at all - which is very ironic as it was the power of the taxonomy that first brought me to drupal ;-)

pyxio’s picture

First post to Merlin ... OK, let's start with the simplest of simplest tutorials for documentation. Let's simply override Drupal's taxonomy term results pages taxonomy/term/% with a custom panel that displays a view. In other words, the urls and contents of the pages will behave identical to Drupal's accept I will be able to totally customize it with a view. I know this is basic 101 stuff. But I still cannot accomplish this. I think once I do and the logic is abundantly clear, I will understand some basics I am just missing now. I have tried to use the taxonomy_term view to ovveride as well and can't get it to work. OK, call me hopelessly frustrated. I am sure I am a few basics short of getting this whole argument, view, panel thing figured out. Once I do, it will be tutorials galore. Cheers, kevin

pyxio’s picture

Hi psco23,

thanks so much for your reply. i am going to try your process and report back. it sounds good short term. but how is that going to work when I have hundreds of companies that i need to select from a list everytime i add news content? Also, shouldn't the recent advances in views and panels combined with the arguments power they offer kinda make nodereference obsolete. Maybe that's a better question for Merlin, is there anything nodereference is better at accomplishing than views + panels with agruments?

pisco23’s picture

when the no. of companies is big, using 'autocomplete' works quite well - better than a list at least.

Coming back to your question though: if you want to do this with Taxonomy, are you not going to have exactly the same problem of selecting from a big set of terms? How do you see this - will each company name be a Taxonomy term? then each news item is 'tagged' with the company_name_as_Taxonomy_term? - if this is the case, you could look at NAT module (Node as Taxonomy). I looked at this before going the NR route, but there was a problem (no idea if it has been addressed). When you create the new node (company) NAT automatically adds the company (name) as a Taxonomy Term - so far so good. the issue I had with this, is that the node you just created did not get automatically tagged with the new term - which didn't match my needs.

If there is a better way of doing this I'd love to hear about it - so I'll keep watching this thread.

pyxio’s picture

hmmm. well, i am just thinking logically, but i would have to say arguments is the ultimate way of solving it. no extra modules to fuss with. simply a smart argument on a panel or view. nothing we are trying to accomplish here suggests to me it can't be done ... and done easily .. with a smart argument. Hence my thread, let's get together and do some documentation here. Because really, the power of panels, views and arguments is out of reach for most folks without it. i'm willing to spearhead this documentation but i need some walk thrus of the basics. Even that is not documented anywhere. Sigh

pyxio’s picture

actually, i wanted to clarify on #14 since you had some questions. Regarding taxonomy, the answer is no, i would not choose from any list at all ... if the term is in the url it will show the relevant information. For example ... company/abc-co as a node ... with the argument we now that the only info to show is for abc co. this is the whole point of arguments. to take it to another level ... say for example i want to include a block with headlines ONLY relevant to abc co. well, since on the news node itself is a company tag of abc co, this should be filtered appropriately. the block would have an argument that looks at the url and identifies the term abc co .. and because the view is filtered to news nodes only ... returns news nodes for abc co.

pyxio’s picture

actually, i wanted to clarify on #14 since you had some questions. Regarding taxonomy, the answer is no, i would not choose from any list at all ... if the term is in the url it will show the relevant information. For example ... company/abc-co as a node ... with the argument we now that the only info to show is for abc co. this is the whole point of arguments. to take it to another level ... say for example i want to include a block with headlines ONLY relevant to abc co. well, since on the news node itself is a company tag of abc co, this should be filtered appropriately. the block would have an argument that looks at the url and identifies the term abc co .. and because the view is filtered to news nodes only ... returns news nodes for abc co.

pyxio’s picture

it seems to me this can be accomplished with views easily. and there is no need for more modules.

pisco23’s picture

Agreed that arguments are the key to pulling the data together via views and panels. I am simply using the nodeID as the main argument and rather inelegantly then pulling in asociated content via the relationship to this argument.

You seem to want to use termID - which is indeed "cleaner". Either way though, the various content items need to be either "referenced" or "tagged" - such that parsing an argument is meaningful : so its probably just two ways of reaching the same end point. I'm not evangelising my solution, just saying that this is the way it best worked for me ;-)

Just an additional thought. If you go the route of overriding term/% where the term is the vocab of company names and the setup os for company info+news items, what will happen if you later have other kinds of terms (say a vocab to tag the news items as, "business", "technology" etc. ) and you try and display these via term/% ?

pyxio’s picture

i really think getting a strong grasp on views and arguments will enable us to do so much without any additional modules. The problem here is the lack of documentation. back on task, regarding what you just wrote ... all of my content is tagged and is output in the url. views and panels and blocks can have arguments which will filter the information i need by the url. the problem i am having is that i have so many places to configure arguments i am probably screwing them all up. should the argument be defined in the view or in the panel? or is it a combination of both, and if so ... how confusing is that? or can i just pick on or the other (views or panels) to define my arguments? so the list of questions goes on. to be honest, i can't see how views or panels is even accessible to the average user due to its lack of documentation. There are a number of views and/or panels experts who can do what i need to do easily. the problem is zero documentation help for the rest of us. Which i am willing to prepare, if somebody will walk me through the process of obtaining the results I'm after ... and i think a lot of people after.

oh yeah, regardingyou last comment on overrding term/% ... i am not sure i follow. the % is a variable. if we are using this as an argument and we usig views to filter out node type, there will be no conflict. it is impossible. that is why arguments are so awesome. now if only i knew how to use them ;o)

Status: Fixed » Closed (fixed)

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

felipe’s picture

subscribing