I love this module! Awesome and just what I needed

I do have a request though

Is it possible to make the page title reflect the letter you are currently observing

Comments

xano’s picture

Title: Dynamic HTML page titles » Show letter in page title for alphabetical lists
Version: 6.x-2.0-beta1 » 6.x-2.x-dev
Category: support » feature

Good idea! I'll check this out ASAP.

netentropy’s picture

great i look forward to it

while i have your attention, the option to split the pages over several paginated pages would be cool too.

so fi you coudl paginate the A's , B's if needed or wanted

xano’s picture

Priority: Normal » Minor

That's another feature, please be so kind to create a new issue for it :-)

xano’s picture

Assigned: Unassigned » xano
Status: Active » Closed (won't fix)

First of all: I won't put an option for this in the admin panel. I am not convinced this feature adds a lot of value, but it will take up space in the interface.

There is, however, a way to do this yourself. Override vocabindex_pager_letter.tpl.php with your theme, but copy the original code. At the end of the override, add the following code:

if ($active == 'active') {
  drupal_set_title(drupal_get_title() . ' » ' . drupal_strtoupper($letter));
}

This will add the letter to the page title. There is one downside: you will have to disable caching at Administer > Site building > Vocabulary Index > Settings.

netentropy’s picture

It adds value for SEO reasons, it allows each letter to be a separate indexable page

There should be a way to do it on your menu_items where you just push the variable into the page title

ill take a look at Glossary and see how they did it and post back next week!

thanks!

xano’s picture

Status: Closed (won't fix) » Fixed

There are separate URLs for each letter already, so indexing those pages should be less of a problem than when using the ordinay Drupal pager (with page=N in the query string).

But, whatever, I guess the SEO argument convinced me :P

Added and committed to 6.x-2.x-dev.

netentropy’s picture

Hey thanks

I am not sure if you used the code above or not

or did you look into the menu_items way?

Ill check it out this week, today is football day!

xano’s picture

Menu items have static titles, so I can't add the current letter to the menu item dynamically. I added a drupal_set_title() to vocabindex_vi_view() to append » X to the page title with X being the current letter.

netentropy’s picture

OK I am mistaken

I thought that in

$items[] = array(

'title' => t(Page Ttile) )

(this is truncated of course)

that you could pass a variable from the link that takes you to this page

i really dont know and have never tried it, just seemed to be possible

thank you though for this feature!

netentropy’s picture

gettting an error in the dev version

Fatal error: Call to undefined function vocabindex_index_load() in /home/xxxxx/public_html/xxxxx/modules/vocabindex/theme/vocabindex_admin_vi_form.tpl.php on line 14

netentropy’s picture

I just tried to go back to RC version and get this

* warning: include(./modules/vocabindex/theme/vocabindex_pager_alphabetical.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/xxxx/public_html/xxxx/includes/theme.inc on line 971.
* warning: include() [function.include]: Failed opening './modules/vocabindex/theme/vocabindex_pager_alphabetical.tpl.php' for inclusion (include_path='.:/usr/lib/php') in /home/xxxxx/public_html/xxxxxx/includes/theme.inc on line 971.

xano’s picture

Please don't hijack issues. The latter problem has already been fixed, see #311833: vocabindex_pager_alphabetical.tpl.php missing for more details.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

xano’s picture

Assigned: xano » Unassigned