Closed (won't fix)
Project:
Nodequeue
Version:
6.x-2.0-rc3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2009 at 23:13 UTC
Updated:
20 Mar 2009 at 05:01 UTC
When creating a nodequeue, the View created for it is named nodequeue_N, where N is the queue ID. When creating a lot of queues, e.g. 30 (I love CCK/Nodequeue/Views/Panels), looking at Nodequeue views in built panels is less than informative. A more meaningful name would be more useful.
I changed includes/views/nodequeue.views_default.inc to create view names like "nqN_title" where N is the queue ID, and title is the lower cased queue title with all non-alphanums replaced with underscores:
$view->name = "nodequeue_$queue->qid";
replaced with
$view->name = "nq" . $queue->qid . "_" . preg_replace('/[^a-z0-9]/', '_', strtolower($queue->title));
If this is of interest/use, I'll put up a patch.
Comments
Comment #1
libeco commentedWill this only change the title, or the real name of the view? I just created a nodequeue view and got a name like this: views-view-unformatted--nodequeue-1.tpl.php
If this is the last nodequeue I create it's fine, but what if I want to create let's say 30 more...
If this is what your post it about I would agree that another naming-convention would be much better!
Comment #2
merlinofchaos commentedThe problem with this thinking is that the qid is the only feature on the nodequeue that cannot change. Changing the name of a view is very problematic; you do NOT want to the name to change just because you changed the title of the queue, that would be bad. And once you change the title, you no longer have the old title to use. SO at the very least you would need to add additional storage.
IMO, the only way to make this work would be to start creating named nodequeues that have unique, unchanging names that you can then give to Views.
Comment #3
libeco commentedI see what you mean and I agree with your last suggestion. I think that would be just fine to at least be able to have a meaningful name at the start.
Comment #4
ezra-g commentedThe qid naming convention is important for the reasons merlinofchaos mentioned and the name of the queue is specified in the View description (listed at admin/build/views), so I'm inclined to mark this as won't fix. I see how the the lack of clarify when emedding views within Panels could be a problem but that is better addressed with a new issue in the Panels queue.
Comment #5
tm-a-apatel commentedcan i have the code for what u have expalained above for changing the views name ......