I am using the "taxonomy display" module. I use to so that I can sort my taxonomy terms by title, instead of by ID, as it does by default. However, I also created a taxonomy template called:
taxonomy-term--product_literature_category.tpl.php
If I enable the "taxonomy display" module and override the taxonomy view for this path:
/taxonomy/term/%
... it also overrides the template I specified above. It would make more sense that the order would be to take my custom template override the module. But it doesn't seem to work that way. But if I disable "taxonomy display", it again takes my template into account.
I have two choices:
I would imagine 1 being difficult (because it doesn't make much sense to use two templates for the same thing). That is why I'm leaning towards an easier way to sort taxonomy views by default, or some other way to specify the ordering of taxonomy terms.
Does anyone know how to do this?
UPDATE
Right now I am going to settle with figuring out a hook to change the sorting of taxonomy terms via a module. That way I can override the sorting for only specific vocabularies. Any pointers to nudge me in that direction would be highly appreciated?
UPDATE 2
I've created teaser_sorter.module and added this function:
function teaser_sorter_views_query_alter(&$view, &$query)
{
print '<pre>'; print_r($view); print_r($query); die();
}
I also made sure my module supports views:
function teaser_sorter_views_api() {
return array(
'api' => 3,
);
}
I can't get it to ever reach my "die". In other words, it's never called. In fact, I also tried overriding "hook_views_pre_execute", but that doesn't ever get called either.
Any ideas?
view : <google-taxonomy-category class="googlecategoryselectiontool" field-name="goo_cat_id" cat-sel=""></google-taxonomy-category>
"class" used for template setup so if I want to use any.tpl then I simply have to write tplname. if no class value given then it will take default template.
"field-name" it will consist name of the request variable which you want to set on checkbox. by default its value going to be "selected_value[]" if no value passed for it.
"cat-sel" it will consist of data of which category need to be selected when html load. it will take value like <?php echo htmlspecialchars(json_encode($selected_value)); ?> in
which $selected_value is the array of all category id which need to be selected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With