2

Howzit! I have a sandbox site set up, and one of my views overrides the default taxonomy term page for one of my vocabularies. The image below shows how it currently is (unstyled) - and this works just fine. The description of the manufacturer is embedded using Views Field View module, and I'm also using the Better Exposed Filters module.

beforeClick for larger image

What I'm trying to do is separate the Sort By/Order form from the Category filter widget form as depicted in the Photoshop'd image below.

beforeClick for larger image

My only experience with overriding tpl files has been minor theming/positioning stuff. So I overrode views-view.tpl.php and views-exposed-form.tpl.php, but the latter obviously just renders one form for exposed filters. Will sincerely appreciate your help with this.

FWIW, I'm using Devel and Theme Developer modules for the first time, and am completely lost with figuring out where the variables I'm looking for are, but I'll create another post for that if I'm still lost.

0

Ok, so I realise that due to the fact that the exposed filters are on one form, it will be difficult to separate the rendered elements. However, I ran some tests using jQuery to reposition the sort elements, and so far it seems to work using the following:

jQuery(document).ready(function() {
  jQuery('div#edit-sort-by-created').appendTo('#custom-sort-block');
  jQuery('div#edit-sort-by-title').appendTo('#custom-sort-block');
});

NOTE: This breaks if Ajax is enabled in the view, but that can be circumvented using the jQuery live() function I'm sure.

It certainly isn't pretty and definitely is a hack, but it will have to do for now. I won't be marking this as the answer in the hopes that someone can suggest a more elegant and Drupaly way of accomplishing this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.