Is it possible to retain the meaning of "promote to front page" when using a panel for a home page?
Here is the problem...
I use a Panel for the home page and it has several views. Right now I have the views set to filter on "promoted to front page" as a requirement for selecting nodes.
The problem is that those views meaningfully exist on their own URLs. On those URL's I want all the nodes to show up based on the other criteria, but not filter on "promoted to home page." When the web editor unchecks "promote to front page" for a particular node, those nodes now disappears from the View as well.
The simple answer is to clone the view, make one filter on promote to front page and the other not. That would turn my four home page views into 8, ughh.
*My idea:* Create an argument in the View. But when I click on argument in the Views UI I *don't see* what I want to see in the drop down: node:promoted to front page.
I'm running Drupal 5.7 and Views 1.6. I'm using Panels 1 dev version from 9/07 (will now update that to Panels 1.2 now that I noticed I'm behind on that one).
Any help on the argument idea or other ways to do what I want to do would be much appreciated.
Thanks,
Shai
One option would be to create a separate CCK field in your content type (radio button, check box, select list, whatever) that your panels can use for filtering what should be displayed on the front page, and then that field will be ignored when the view is used by itself. That will allow you to still use one view in multiple places.
Steve
Shai Gluskin wrote:
Is it possible to retain the meaning of "promote to front page" when using a panel for a home page?
Here is the problem...
I use a Panel for the home page and it has several views. Right now I have the views set to filter on "promoted to front page" as a requirement for selecting nodes.
The problem is that those views meaningfully exist on their own URLs. On those URL's I want all the nodes to show up based on the other criteria, but not filter on "promoted to home page." When the web editor unchecks "promote to front page" for a particular node, those nodes now disappears from the View as well.
The simple answer is to clone the view, make one filter on promote to front page and the other not. That would turn my four home page views into 8, ughh.
*My idea:* Create an argument in the View. But when I click on argument in the Views UI I /don't see/ what I want to see in the drop down: node:promoted to front page.
I'm running Drupal 5.7 and Views 1.6. I'm using Panels 1 dev version from 9/07 (will now update that to Panels 1.2 now that I noticed I'm behind on that one).
Any help on the argument idea or other ways to do what I want to do would be much appreciated.
Thanks,
Shai
Steve and others...
Thanks for the response.
The version of Panels I'm using (Panels 1 dev from 9/07) doesn't overly any of its own filtering mechanisms on the View other than:
* # of nodes to display * View arguments
That is why I wanted to use and argument like /view_name/front based on the "promote to front" toggle. I guess I can create another field and use it as the argument. Though that field is already there and I'd rather use it.
Were you indeed suggest I use the View arguments in Panels View:configure or am I missing something?
Shai
On Tue, May 6, 2008 at 11:15 AM, Steve Edwards killshot91@comcast.net wrote:
One option would be to create a separate CCK field in your content type (radio button, check box, select list, whatever) that your panels can use for filtering what should be displayed on the front page, and then that field will be ignored when the view is used by itself. That will allow you to still use one view in multiple places.
Steve
Shai Gluskin wrote:
Is it possible to retain the meaning of "promote to front page" when using a panel for a home page?
Here is the problem...
I use a Panel for the home page and it has several views. Right now I have the views set to filter on "promoted to front page" as a requirement for selecting nodes.
The problem is that those views meaningfully exist on their own URLs. On those URL's I want all the nodes to show up based on the other criteria, but not filter on "promoted to home page." When the web editor unchecks "promote to front page" for a particular node, those nodes now disappears from the View as well.
The simple answer is to clone the view, make one filter on promote to front page and the other not. That would turn my four home page views into 8, ughh.
*My idea:* Create an argument in the View. But when I click on argument in the Views UI I *don't see* what I want to see in the drop down: node:promoted to front page.
I'm running Drupal 5.7 and Views 1.6. I'm using Panels 1 dev version from 9/07 (will now update that to Panels 1.2 now that I noticed I'm behind on that one).
Any help on the argument idea or other ways to do what I want to do would be much appreciated.
Thanks,
Shai
-- [ Drupal support list | http://lists.drupal.org/ ]
Well, if you have to use arguments, you could add some code to the Argument Handling Code field and fill the args array that way (I did the same thing recently, and it works well). You could add the view URL (or whatever else you need) as an argument, and would be good to go. The only thing is, you still need some field set up as an argument that you can pass the argument to. What you could do is add the CCK field I suggested, add it as an argument, and then pass the value to the args array in the argument handling code for the view. I'd be happy to give you a hand with the code if you need it.
Steve
Shai Gluskin wrote:
Steve and others...
Thanks for the response.
The version of Panels I'm using (Panels 1 dev from 9/07) doesn't overly any of its own filtering mechanisms on the View other than:
- # of nodes to display
- View arguments
That is why I wanted to use and argument like /view_name/front based on the "promote to front" toggle. I guess I can create another field and use it as the argument. Though that field is already there and I'd rather use it.
Were you indeed suggest I use the View arguments in Panels View:configure or am I missing something?
Shai
On Tue, May 6, 2008 at 11:15 AM, Steve Edwards <killshot91@comcast.net mailto:killshot91@comcast.net> wrote:
One option would be to create a separate CCK field in your content type (radio button, check box, select list, whatever) that your panels can use for filtering what should be displayed on the front page, and then that field will be ignored when the view is used by itself. That will allow you to still use one view in multiple places. Steve Shai Gluskin wrote:Is it possible to retain the meaning of "promote to front page" when using a panel for a home page? Here is the problem... I use a Panel for the home page and it has several views. Right now I have the views set to filter on "promoted to front page" as a requirement for selecting nodes. The problem is that those views meaningfully exist on their own URLs. On those URL's I want all the nodes to show up based on the other criteria, but not filter on "promoted to home page." When the web editor unchecks "promote to front page" for a particular node, those nodes now disappears from the View as well. The simple answer is to clone the view, make one filter on promote to front page and the other not. That would turn my four home page views into 8, ughh. *My idea:* Create an argument in the View. But when I click on argument in the Views UI I /don't see/ what I want to see in the drop down: node:promoted to front page. I'm running Drupal 5.7 and Views 1.6. I'm using Panels 1 dev version from 9/07 (will now update that to Panels 1.2 now that I noticed I'm behind on that one). Any help on the argument idea or other ways to do what I want to do would be much appreciated. Thanks, Shai-- [ Drupal support list | http://lists.drupal.org/ ]