Closed (fixed)
Project:
Node Order
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Jan 2009 at 20:11 UTC
Updated:
26 Feb 2009 at 18:29 UTC
Please put any remarks regarding testing the upcoming release in this issue.
Comments
Comment #1
marcus_clements commentedSeems to be working well for me.
What's needed to make the admin form themable?
I tried overriding
template_preprocess_nodeorder_admin_display_form() in my zen subtheme by replacing template with mythemename and putting it in template.php to no effect
I tried copying nodeorder-admin-display-form.tpl.php into my theme and editing - no joy
In the file comments i saw
* @see theme_nodeorder_admin_display()
but this function doesn't exist. If this function:
were changed to
theme_nodeorder_admin_display_form_submit($form, &$form_state)and called via
theme('nodeorder_admin_display_form_submit', $form, &$form_state)would the theming all start working?
If no-one replies I'll try this tomorrow...
cheers
Marcus
Comment #2
pvanderspek commentedActually, it should be themeable (similar to how you can theme the admin-page for the blocks module), but then you should use this function: theme_nodeorder_admin_display. Not the *-submit version.
(modified: 04-02-2009 20:34+01:00)
Comment #3
marcus_clements commentedOk I had another look:
I want to add an image thumbnail to the noeds in the ordering admin form so I copied nodeorder-admin-display-form.tpl.php to my theme - added a table cell - all fine.
To get the image src I've overridden template_preprocess_nodeorder_admin_display_form in template.php in a Zen subtheme renaming it af2008_preprocess_nodeorder_admin_display_form, however without altering the code the titles don't display. In addition, to get the image details into the $node_listing variable i think I need to add an attribute to the form in nodeorder_admin_display_form, so I override this in template.php as af2008_nodeorder_admin_display_form. Now things get strange, in my debugger I can see the original funcions in nodeorder.admin.inc AND my overrides being called.
I'm obviously missing something - do I need to register my functions somewhere or what am i missing? I tried searching for how to theme the blocks admin page as you suggested but didn't find anything useful....
In the meantime I have another problem and work around:
I have a view with a filter for taxonomy term A and an argument for taxonomy term B, but I want the nodes ordered by term B. It seems using a sort criterion of weight in tid the nodes are ordered on term A.
However as a work around I found that if I make a second argument with a default of term A, weight in tid sorts on term B.
Is this by design? If so, worth documenting...
A third possibility that I haven't investigated is that the query retrieves weight in tids for both tid's in which case I will be expecting strange behaviour as my editors start playing with noderorders...
cheers
Marcus
Comment #4
marcp commentedHere's the Drupal 6 theming guide -- http://drupal.org/node/341628 -- if you've got the right .tpl.php file names in your theme, maybe you haven't cleared the theme registry.
Comment #5
pvanderspek commentedTask is finished. Please open a bug report if theme doesn't work.