The position of location in the create contents pages for types that have locations is fixed at the bottom. I would like it to be more prominent on the page, but there is no way to move it up.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | loc_node.patch | 2.2 KB | derhasi |
| #1 | Picture 1.JPG | 37.66 KB | lyricnz |
Comments
Comment #1
lyricnz commentedThis position is already configurable on each place that the Location fields are placed (on content-type edit page, or user-settings page). See attached screenshot for example. If you can't see this, you might want to try the -dev release - a number of changes have gone in since RC2.
Comment #2
mikel1 commentedOops! I expected it to be on the "manage fields" page, where I can change the order of other fields. I didn't think to look for it on the content type edit page. Thanks for pointing this out.
Comment #3
mikel1 commentedActually, without it being on the manage fields page I can't put the location wherever I want. Weight -3 puts it too high, -2 too low. The issue is the rest of the fields are manager by drag and drop, rather than setting an absolute number. So my original feature request stands - to move location via manage fields...
Comment #4
patchak commentedI agree as this seems to be the only difference between normal node location and the cck field??
Patchak
Comment #5
bdragon commentedExecution order, maybe?
What happens if you give location a negative weight in the system table?
Comment #6
mikel1 commentedNot sure I understand the question. It is set to -2 now, and appears one item below where I would like to put it. I'm guessing that the "drag and drop" order puts consecutive numbers in the table, and it's sorting alphabetically or by some other criteria.
Comment #7
patchak commentedI managed to place it approximately where I want it with the weight, but I think it would be more useful to concentrate on the features of the cck field so that then people can really use the power of cck combined with this?? As far as I can see this is one of the only differences between the two ways to set up locations module ??
Comment #8
jefftrnr commentedI have the same problem. It would be MUCH easier for me to manage the Location weight in relationship to all of the other CCK and core fields on the "Manage Fields" page.
I tried adding this code to the content_content_extra_fields hook function. The "Location Module" form group is displayed in the drag/drop list, but the altered weight values aren't saved to the database. Does this help anyone figure this out?
Comment #9
derhasi commentedI also tried to solve this issue, but I could not make it, due to intense modification.
My .module is available at http://drupalbin.com/8336 .
I tried the following steps:
* implemenation of hook_content_extra_fields
I hoped replacement of 'location' to 'locations' would have changed anything -because 'loactions' is the key getting rendered- , but nothing changed.
* then I tried to change location's settings, after editing the manage fields section, so I added:
to
location_node_form_alter()and creatingEditing the variable this way worked, the values changed. But location form and view were still on the same weighted place, as it was before.
So I'm clueless again :(
Comment #10
derhasi commentedI worked a little more on the issue, and found some minor bugs of my testing module. (Did some change in location.module, I should not have done).
So with the same idea as the comment above, I created a patch, and it works. Step 1 and 2 were needed - only using
location_node_content_extra_fields()seems not to work.Patch attached. I hope someone will review.
Comment #11
derhasi commentedchanged issue title
Comment #12
bdragon commentedAhh, OK.
Nice patch.
I investigated this a bit, and the reason it doesn't work automatically is CCK is trying to sort things in content_nodeapi op 'view' before location.
Committed a slightly modified version that disables the regular collection weight
http://drupal.org/cvs?commit=179728
http://drupal.org/cvs?commit=179730
Hmm, I just realized that I should be keeping the *display* weight in sync too.
Comment #13
bdragon commentedOK, I figured I should just go ahead and plain hide the weights, I figure it would be less hassle that way.
If it turns out to be a problem, I can add the link that I had put in in the previous revision back.
http://drupal.org/cvs?commit=179736
http://drupal.org/cvs?commit=179738
Comment #15
jimmb commentedI also posted this question here. Can anyone comment on whether this patch will work for Drupal 5? And if not, a revised patch would sure be appreciated.
Jim
Comment #16
ankur commentedAs 5.x is no longer supported.