I've been looking high and low for something that has this functionality. Luckily this is an amazing module that does exactly what I want it to do (have separate views based on vocab).

However, the only downside right now that prevents me from using this module is that, the H2 tags change from their original term title to Vocab > Term. And my breadcrumbs change from Home > Vocab > Term to Home. I am using the module "Custom Breadcrumbs" for my breadcrumbs.

Is there a way to keep my current H2s and Breadcrumbs intact while still using this module? Any help would be much appreciated. Also thanks for making this awesome module.

CommentFileSizeAuthor
#28 cbt_tvi-6.x-1.x-dev.zip1.2 KBJenechka
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NWOM’s picture

Title: TVI Changes default titles and breadcrumbs » TVI Changes default H2s and breadcrumbs
derekwebb1’s picture

Basically I need to add a setting or two to make that change happen. I will see if I can get that done in the next day or two.

NWOM’s picture

Thanks for the quick response. I can't wait to test it!

derekwebb1’s picture

Assigned: Unassigned » derekwebb1

I see what is going on with the title however the bread crumb issue is rather odd. I am looking into this though. I just havent had a lot of time this last week. I have a deadline coming up this Tuesday that, once passed, will free up a bit of time for this. I havent forgotten about it.

I plan to at least fix the title issue by Thursday or so.

Thanks, Derek

Michsk’s picture

i've got the samething. I am using also custom breadcrumbs.

Michsk’s picture

i think that there is nothing wrong with the breadcrumbs, only the title. I to have the breadcrumb title but thats because i show the title in the breadcrumbs, so i think thats causing the problem.

And how is this h1 error going?

derekwebb1’s picture

Sorry for the delay. The problems are almost all finished at the moment.

Since TVI has it's own page callback, the breadcrumb thing is tricky. We are going to be using whatever breadcrumb and title the view would have used. Hope that works for you guys.

Also, the beta4 version will allow you to pick what view to use as well. We are hoping to have it ready for release by like Monday...

Thanks for your patience.

Derek

derekwebb1’s picture

Status: Active » Needs review

Try the Beta4 version. It may just fix your issues... This issue will be closed in 2 weeks if no replies.

Derek

Michsk’s picture

i will test it. tonight

NWOM’s picture

Awesome, I'll give it a shot on Monday.

derekwebb1’s picture

How did it go? Does Beta4 resolve your issues ok?

Thanks. Derek

NWOM’s picture

I seem to be having the same problems with titles and breadcrumbs oddly enough. Let me tweak a few more things and then I'll get back to you. Thanks.

NWOM’s picture

Ah didn't see the new stable release, was instead using Beta4. I'll try that first. Thanks again.

awebb’s picture

One thing to mention is that the breadcrumbs and title are natively based on the view being used starting with beta 4. These two items are themeable, though. So if they do not fit your needs out of the box you can change them without having to rework the module.

derekwebb1’s picture

Status: Needs review » Closed (fixed)

Closing this off. V 1.0 fixed this. Use the view title (regular or arg style (%1...)) to get the title to display...

wingflap’s picture

I've isoloated the issue. This has been driving me crazy for a while now because it involves Views, Pathauto, Custom Breadcrumbs, and TVI. First of all, I'm using TVI 6.x-1.1. My problem is as follows:

I have 3 Vocabularies and 3 views all based off of the default then enabled taxonomy term view in Views. The are each the same as the default page with the exception of the path. So for a Vocubulary called "Articles", the path for the view is set as articles/%.

In Pathauto in the taxonomy section, I have the path for 'Articles' as articles/[catpath-raw]. I have a term called "News" and a term called "Local" beneath "News" and content associated with the "Local" term (term 4).

I have TVI set up so that the "Articles" vocabulary uses the page view for the path articles/%. I have Custom Breadcrumbs set up to display the taxonomy breadcrumb (without setting up any custom taxonomy breadcrumbs) because the taxonomy breadcrumb functionality works right out of the box.

When I go to articles/news/local the view lists the nodes, but there is no breadcrumb. When I go into the view, edit the 'Taxonomy Term with Depth" argument by checking the show taxonomy term parent in breadcrumb option, the breadcrumb displays as:

Home >> Articles >> News

When looking at nodes assocaited with "Local". The link to news is not the pathauto-specified link; instead it's taxonomy/term/4/1 (where 4 is the term and 2 is the depth).

If I go to admin/site config/modules and disable TVI and then refresh the "Local" page, I see a properly created and configured breadcrumb. When I go back and enable TVI, the breadcrumb disappears.

The problem is that you are going out to the view to get the breadcrumb. It seems as if you check if that particular view has an argument that specifies that views should handle the breadcrumb. Then it's OK to get the breadcrumb from the view. Otherwise, it seems that you're saying not to get a breadcrumb. I'm not sure at what point Custom Breadcrumb intercedes, but I'm sure that it's after TVIs logic. When I enable TVI, use a single taxonomy term view (site-wide) and don't check the "Override" in any of the Vocabularies, I still don't see any breadcrumb if the view's argument doesn't specify to use the view's breadcrumb. If I do check it, then I see the wrong breadcrumb. Views is doing the right thing. If you tell it to create a breadcrumb for a term argument with depth, it's doing just that. If you shut that off, you are just not showing a breadcrumb.

Once again, after seeing the behavior above, if I disable TVI, I see the correct breadcrumbs.

Let me know if there's any other information I can provide about this that might be of some help. I love this module since I have a taxonomy-based site and get bored with each Vocabulary showing the same views with the same theming.

Michsk’s picture

wingflap: you completely nailed it with your description. These are also the modules i am using and am experiencing the same issue. Thanks for this clear description.

NPC’s picture

What wingflap describes is also my exact situation - no breadcrumbs at all (even no "Home") with TVI enabled, and the rest of the modules from his description are used too.

So what are our options for now - don't use TVI or don't use breadcrumbs? Or is there some other solution?

rocketeerbkw’s picture

Status: Closed (fixed) » Active

subscribing

derekwebb1’s picture

Not sure how to fix this since TVI is taking over the page callback. I don't know if the "old" breadcrumb is even still available at that point. That is why the BC must come from the view... If anyone has any ideas I am all ears.

wingflap’s picture

Sorry... rethinking...

wingflap’s picture

But you do have the page path. The Custom Breadcrumb module provides an API. You could possibly use this API to construct the breadcrumb bypassing your logic if the module is available. Otherwise, maintain the existing logic. What puzzles me is that you are constructing the URL correctly as a taxonomy term with depth. There is other logic that Views itself is using though because it's URLs are being properly processed via Pathauto and Custom Breadcrumbs whereas the view being spit out by TVI is not.

If you enable the Custom Breadcrumbs API (admin/site building/modules) you can select a module's template file to create a custom breadcrumb for. TVI does not provide a template file; instead, it constructs the view page programatically within the module itself. I tried creating a breadcrumb based on the views-view and the views-view-node template file, but all node tokens were ignored.

Am I missing something or should there perhaps be a template file being used here?

--Edit--
The CB API provides a means to add a page to the list of module pages for breadcrumbs. I'm giving this a try now. I'm going to try to override the TVI breadcrumb logic and replace it with a call to the CB API. If this works, then I just have to figure a way to identify the presence of the CB module to conditionally call this.

sistro’s picture

My dream is to have as menu breadcrumb working... It's to hard to do it?

Bartezz’s picture

Version: 6.x-1.0-beta3 » 6.x-1.1

I'm still experiencing this in 6.x-1.1, has this issue had some attention yet?

Cheers

jmlane’s picture

Version: 6.x-1.1 » 6.x-1.3

No matter what I do, with TVI (6.x-1.3) enabled, I cannot get the TVI-enabled Views to generated breadcrumbs as expected.

Can someone please outline exactly how I can test if the breadcrumb generation in Views is broken by TVI's hijacking of hook_menu_alter() callback?

emettler’s picture

I did a workaround to this for Drupal 7 in case it helps anyone.

Essentially in your template.php file - I modified the theme_delta_blocks_breadcrumbs function.

Critical lines of code:

  • To remove all items I added
    	 if ($item !== "[all items]"){
          $output .= '<li' . drupal_attributes($attributes) . '>' . $item . '</li>';
    	  }
  • To change the last item in breadcrumbs and to set the page title I did this - not super pretty but it works:
    	 if (strpos($item, "MenuSelection")){
    		$currentpath = current_path();
    		$pathbits = explode("/", $currentpath);
    		$tid = $pathbits[2];
    		$term = taxonomy_term_load($tid);
    		$item = $term->name;
    		$page_title=$item;
    		}
Anonymous’s picture

Hi emettler,

I've placed the following in my D7 template.php file but doesn't seem to work.

function MYTHEME_delta_blocks_breadcrumb($variables) {
if (strpos($item, "MenuSelection")){
$currentpath = current_path();
$pathbits = explode("/", $currentpath);
$tid = $pathbits[2];
$term = taxonomy_term_load($tid);
$item = $term->name;
$page_title=$item;
}

Just to be sure, this fixes the breadcrumb so you get Home > Partent(s) > child ?

Thanks,

Steve

Jenechka’s picture

FileSize
1.2 KB

Falks, I got the nice solution found by myself. It was tested on drupal 6.

Explanation:
Both modules (custom_breadcrumbs_taxonomy and tvi) alters menu using hook_menu_alter. To see custom taxonomy breadcrumb, custom_breadcrumbs_taxonomy_menu_alter should be implemented after tvi_menu_alter. Thats all falks.

Solution:

// Execute once
// Make the custom_breadcrumbs_taxonomy module heavier than tvi.
$tvi_info = db_fetch_object(db_query('SELECT s.weight FROM {system} s WHERE s.name = \'tvi\' LIMIT 1'));
db_query("UPDATE {system} SET weight = ".($tvi_info->weight + 5)." WHERE name = 'custom_breadcrumbs_taxonomy'");

And

//Prevent setting breadcrumb by tvi module.
YOUR_THEME_tvi_breadcrumb($term, $view) {
  return array();
}

Also attach module that does al the stuff from above.

fadgadget’s picture

hi would #28 work for D7? thanks

I could chnge the db weight manually i suppose. Just need the code to stop tvi setting it again. I think

kevinquillen’s picture

Version: 6.x-1.3 » 7.x-1.x-dev
Status: Active » Needs work

Yes, weight is the issue if you are using Custom Breadcrumb. Setting the custom breadcrumb module weight higher than TVI will resolve the breadcrumb issue.

kevinquillen’s picture

Issue summary: View changes

Closing as outdated, unless someone wants to roll a patch (this issue was filed for 6.x).

kevinquillen’s picture

Status: Needs work » Closed (outdated)