Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Link-Title as page title (how can I do it?)

Quote Reply
Link-Title as page title (how can I do it?)
In Links SQL I use span pages, ONE link per page.

I want the TITLE of each generated page to be different.

My idea is, to give each page the title of the link title.

How can I do this and in which template???

_PLEASE_ answers also as Email!

Greetings from germany
Marco
Quote Reply
Re: [marco.k] Link-Title as page title (how can I do it?) In reply to
There is a detailed page feature in Links SQL, so would be better to use that, instead of displaying one link per page.

If you explain what would you want to do, we may give you more personal advices for you.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Link-Title as page title (how can I do it?) In reply to
In Reply To:
There is a detailed page feature in Links SQL, so would be better to use that, instead of displaying one link per page.

If you explain what would you want to do, we may give you more personal advices for you.

I Thougt, that I DID explain, what I want to do...

I definately WANT to show only one link per page. I'm NOT interested in any DETAILS. I've deactivated all Features like "Hits", "Votes" and so on, because I dont need them.

- I want to use static HTML pages.
- I need them for the search engines.

And NOW I want, that the title of the link is also used as the title of each single html page.

So: Is there a feature, to use the <title> ... </title> in the dependent template (category.html?!) and fill it with the title of the link on this page?

Google and Co would love this!

bye
marco
Quote Reply
Re: [marco.k] Link-Title as page title (how can I do it?) In reply to
No, there is no such feature.

The easiest way to do what you want, to place all the content from category.html between the <html> ... </html> to link.html, including the <title> ... </title> tags.

This way you can force to have the <%Title%> tag of links.html available on category.html page.
(of course you have to set links per page option to 1) Wink

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Link-Title as page title (how can I do it?) In reply to
In Reply To:
No, there is no such feature.

The easiest way to do what you want, to place all the content from category.html between the <html> ... </html> to link.html, including the <title> ... </title> tags.

This way you can force to have the <%Title%> tag of links.html available on category.html page.
(of course you have to set links per page option to 1) Wink

This is, what I'v thought first... But as I understand ist, LINKS SQL includes link.html in category.html.

So, does this idea really work, when all content from category.html is in link.html and category.html is EMPTY?

cu
Marco
Quote Reply
Re: [marco.k] Link-Title as page title (how can I do it?) In reply to
Although I've never tried, I think, Yes, basically should work.

Make a backup of category.html & link.html and try this out.
In category.html you just place a <%links%> tag, and place all the normal html tags and your link info to links.html.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [marco.k] Link-Title as page title (how can I do it?) In reply to
You have to put at least
Code:
<%loop links_loop%>
<%include link.html%>
<%endloop%>
or
Code:
<%links%>
into category.html. To set the title of a category page to the title of a link requires more effort, you could extract it from <%links_loop%>, though, maybe something like (not tested, not sure if this works...)
Code:
<%loop links_loop%>
<%set my_title = $Title%>
<%endloop%>

...


<title><%my_title%></title>

.....

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [marco.k] Link-Title as page title (how can I do it?) In reply to
Hi,

You could accomplish this with a global:

sub {
my $tags = shift;
my $links = $tags->{link_results_loop};
if (ref $links) {
return $links->[0]->{Title};
}
return "No links on this page";
}

All the links that are displayed on a category page are available in the link_results_loop variable.

Hope this helps,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Link-Title as page title (how can I do it?) In reply to
Hi Alex!

After I've tried out all other ideas I need help to try yours.

What does this mean: "You could accomplish this with a global:"

WHERE do I have to put WHAT in?
Sorry for that question, but I'm not understanding all in your program
;-)

bye and thanks in advance
Marco
Quote Reply
Re: [marco.k] Link-Title as page title (how can I do it?) In reply to
You need to goto;

Build > User Globals

Then add a new global by selecting the blank box at the bottom, and pasting the code that Alex provided you with. Then call the new global something like 'new_links' and click on the button to add it. Then in your templates add the new global by putting <%new_links%>

Hope that helps Tongue

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Link-Title as page title (how can I do it?) In reply to
Hi Andy!

This is, what I've tried.

Then I get as title on EVERY page
"No links on this page".

So, what is missed?

I take the global <%new_links%> between the title tag and always get this "No links on this page" as a title.
Quote Reply
Re: [marco.k] Link-Title as page title (how can I do it?) In reply to
Crazy
I still need help on this.

Not one of the tips worked since now.

The manual.pdf has 109 pages and not one about the variables or "link_results_loop".

The tip with the global does not work like described.

Here again, what I need:
1. I use span pages
2. One link per page
3. I want the title of the page to be the same like the title of the link on this page.

explanation: There is a link to microsoft.de and the title is "Go to MS".

Now this page in the browser should have the page title "Go to MS".

Sounds easy, is good for search engines when used with static pages, but seems to be impossible.

... or not?

Thank you to everyone who tried it till now.

Marco
Quote Reply
Re: [marco.k] Link-Title as page title (how can I do it?) In reply to
In Alex's global, you need to change

$tags->{link_results_loop}

to

$tags->{links_loop}

Then you can include this global in your category.html template file.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Link-Title as page title (how can I do it?) In reply to
In Reply To:
In Alex's global, you need to change

$tags->{link_results_loop}

to

$tags->{links_loop}

Then you can include this global in your category.html template file.

THATS IT!

Thank you very much. Works perfect!

bye
Marco