From: Chris B. <ch...@bd...> - 2006-06-11 01:06:37
|
Hi Martin, Thanks for your advice -- I never would have figured that out on my own! I had to change a couple of other instances from undef to href_search_global to make ALL the links absolute, but I believe I have it working at this point. I'm now struggling with something else -- page titles (which, I have found, are one of the most important factors in SEO). It seems like *some* of the page titles are set by the method init_main in Page.pm, but not all of them. I'm now spitting out $bibliotech->command->page and I was going to write a case statement based on the value of that variable. But, from clicking around on the site, I see that $bibliotech->command->page can be set to "home," "popular," "add," "login," "addgroup," "addtagnote," "retag," "register" and probably a host of other values. However, the confusing part is that when I click on Recent Activity (http://www.mysite.com/recent), My Bookmarks (http://www.mysite.com/library), or any tag (http://www.mysite.com/tag/foo), username (http://www.mysite.com/user/scott) or date (http://www.mysite.com/date/2006-06-10), the code doesn't flow through the init_main method and the $bibliotech->command->page variable doesn't get set. I'm trying to make it easy to configure different page titles for the different parts of the site and I guess I need to know when I'm in the following areas of the site: recent, library, tag, user or date. Any thoughts on how I might be able to do this? Thanks! Chris -----Original Message----- From: Martin Flack [mailto:ma...@ne...] Sent: Friday, June 09, 2006 9:02 PM To: Chris Bucchere Cc: con...@li... Subject: Re: [Connotea-code-devel] Issue with recent tags Hi Chris, Thanks for pointing this out and well done on the detailed explanation. You're correct. The components will provide "global" href's if they are called with the "main" option set to true, but otherwise they will provide additive href's. However as you point out this is not always desirable; we only designed it to work with the site layout for connotea.org that we had contemplated at the time. The simplest fix that I can think of right now is this. Open Bibliotech/DBI.pm and search for this line: my $href_type; Change to: my $href_type = $self->options->{href_type} ? 'href_search_'.$self->options->{href_type} : undef; (That can all go on one line, it will wrap in this email.) Then in your template change: ${component:ListOfActiveTags} to: ${component:ListOfActiveTags(href_type=global)} That should do it. I reserve the right to change the option name before next release. Well heck I reserve the right to change anything. ;-) But href_search_global() and $href_type are the sort of variable names that we are currently looking to refactor. Too geeky. ;-) Cheers, Martin Chris Bucchere wrote: > I've found an interesting issue with the ListOfActiveTags component. > > > > I've added a reference to ListOfActiveTags to the default template on > one of my connotea implementations. I'm guessing it wasn't meant to be > used that way because when you click on a tag (say "foo") it takes you > to http://www.mysite.com/tag/foo but then if you click on recent tag > "bar" you end up at http://www.mysite.com/tag/foo/bar instead of > http://www.mysite.com/tag/bar. I need to "absolutize" the URL prefix > to Just http://www.mysite.com/tag so that when people click on a tag > name, it always prepends http://www.mysite.com/tag, not the current request URL. > > > > The problem is that I don't know the code well enough to figure out > what to change. > > > > Any suggestions? > > > > Thanks! > > Chris > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________ > Connotea-code-devel mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/connotea-code-devel |