Gossamer Forum
Home : Products : Gossamer Links : Discussions :

LINKS_NEW & crumbs in GLinks v. 3.0.1

Quote Reply
LINKS_NEW & crumbs in GLinks v. 3.0.1
LINKS_NEW and build_new_url/build_new_path should be independent in crumbs (and everything else)

Example:

If you change LINKS_NEW to New_Resources and leave build_new_url/build_new_path to be mysite.ext/New

you'll end up with error when trying to access .../New page via crumbs ...

> Newest_Resources > Tuesday, April 26 2005

Newest_Resources is linked to .../Newest_Resources/index.html instead of .../New/index.html


Very old bug Crazy
Quote Reply
Re: [Payooo] LINKS_NEW & crumbs in GLinks v. 3.0.1 In reply to
LINKS_NE W is the text that is used where the text "New" is used. If you want to change the path of new links, then change build_new_url and build_new_path.

Adrian
Quote Reply
Re: [brewt] LINKS_NEW & crumbs in GLinks v. 3.0.1 In reply to
Hi Adrian,

Please reread my post - try to make described change - try to navigate using crumbs.

>>>
If you want to change the path of new links, then change build_new_url and build_new_path.
>>>

No, I don't want to change
build_new_url and build_new_path, I just want to change LINKS_NEW to 'Newest Resources'.
But, this will cause the error I am talking about.

Thank you

Quote Reply
Re: [Payooo] LINKS_NEW & crumbs in GLinks v. 3.0.1 In reply to
Ah, I see the problem. This was sort of a limitation of how the crumbs are done, but I'll see if we can add a workaround.

Adrian
Quote Reply
Re: [brewt] LINKS_NEW & crumbs in GLinks v. 3.0.1 In reply to
Great! Thanks!
Quote Reply
Re: [Payooo] LINKS_NEW & crumbs in GLinks v. 3.0.1 In reply to
If you need it fixed, now, you can edit the Utils.pm and change the two occurrances in the sub paging routine.

I think that's where it's located, but there might be some other areas, since the paging code was updated in the last round of updates, this might only be the legacy area.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [brewt] LINKS_NEW & crumbs in GLinks v. 3.0.1 In reply to
Here's a workaround for the New issue (It doesn't look like there are any others, but let me know if you find any):
Code:
--- Build.pm 26 Apr 2005 03:10:55 -0000 1.115
+++ Build.pm 27 Apr 2005 21:50:49 -0000
@@ -1029,7 +1029,19 @@

my @si = split /\//, $input;
for (0 .. $#si) {
- push @cats, { Name => $si[$_], URL => ($_ == $#si and $url) ? $url : "$CFG->{build_root_url}/" . $cat->as_url(join "/", @si[0 .. $_]) . "/$CFG->{build_index}" };
+ my $curl;
+ if ($_ == 0) {
+ if ($si[$_] eq Links::language('LINKS_NEW')) {
+ $curl = $CFG->{build_new_url};
+ }
+ else {
+ $curl = $si[$_];
+ }
+ }
+ elsif ($_ == $#si and $url) {
+ $curl = $url;
+ }
+ else {
+ $curl = "$CFG->{build_root_url}/" . $cat->as_url(join "/", @si[0 .. $_]) . "/$CFG->{build_index}";
+ }
+ push @cats, { Name => $si[$_], URL => $curl };
}

return \@cats;

Adrian

Last edited by:

brewt: May 1, 2005, 11:40 AM
Quote Reply
Re: [brewt] LINKS_NEW & crumbs in GLinks v. 3.0.1 In reply to
I want to use different fields for each template set for the crumbs. ie:

luna templates: Home > default category name > default subcategory name > default detailed title
alt templates: Home > alt category name > alt subcategory name > default detailed title

taking alt category & alt subcategory names from the category field Multilang_alt_Name

However, I need the detailed page to display the default Title because remains the same in all templates.
Questions:
  1. Will this be automatically done by the multilanguge plugin upgrade?
  2. Can I make these changes using one or more globals?