Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Combined include_header file

Quote Reply
Combined include_header file
I have been asked to take a look at an install of links sql and I have cencountered two problems that I hope someone can advise on.

Problem 1 is a combined include header file which causes problems when you look at the homepage as it produces an unknow tag file.

I feel that this is close, but it still does not quite work.

<%if category%>
<TITLE><%Name%> | Site Name</TITLE>
<%else%>
<TITLE>Directory Home | Site Name</TITLE>
<%endif%>

The next problem is due to multiple similar categories. For example

Regional/Middle_East/index.html

has two links to it in the parent category loop

Middle East (0)
Middle_East (0)

Could it be possible to delete anything with a _ in it, or does another option spring to mind?

Cheers
Quote Reply
Re: [ukseo] Combined include_header file In reply to
Hi ukseo

Try

<TITLE><%if category_id%><%Name%><%else%>Directory Home<%endif%> | Site Name</TITLE>

I'm not sure about the second question but there should be something in the forums about removing the underscore.

Regards

minesite
Quote Reply
Re: [ukseo] Combined include_header file In reply to
Quote:
The next problem is due to multiple similar categories. For example

Regional/Middle_East/index.html

has two links to it in the parent category loop

Middle East (0)
Middle_East (0)

Could it be possible to delete anything with a _ in it, or does another option spring to mind?

Looks like it could be the reminance of a failed Data import, where as the - wasn't taken into account, and a duplicate category was created.

The best way to get around this, would probably be to move the links from these categories into one (or the other), and then delete the empty category.

Quote:
<%if category%>
<TITLE><%Name%> | Site Name</TITLE>
<%else%>
<TITLE>Directory Home | Site Name</TITLE>
<%endif%>

The way I normally get around this, is by using te <%set%> tag. i.e, in home.html;

<%set HomePage = 'TRUE'%>

... and then in include_header.hml;

Code:
<%if HomePage%>
<TITLE>Directory Home | Site Name</TITLE>
<%else%>
<TITLE><%Name%> | Site Name</TITLE>
<%endif%>

Hope that helps.

Cheers

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] Combined include_header file In reply to
>>The way I normally get around this, is by using te <%set%> tag. i.e, in home.html;

Like it, thats is obvious. Cheers

Re the dup categories, I think that is what happened. There arec no links in the whole DB yet, so thats not a problem.

Could I use the sql monitor ro run something like

DELETE * FROM lsql_Category WHERE Name LIKE '%_%'

Does that look dodgy?
Quote Reply
Re: [ukseo] Combined include_header file In reply to
No worries.

Quote:
Could I use the sql monitor ro run something like

DELETE * FROM lsql_Category WHERE Name LIKE '%_%'

Does that look dodgy?

I would give this a go first, to see how it looks;

SELECT * FROM lsql_Category WHERE Name LIKE '%_%'

...and then, to do the delete;

DELETE FROM lsql_Category WHERE Name LIKE '%_%'

(note the missing *, which you had in you're query Smile).

Hope that helps.

Cheers

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] Combined include_header file In reply to
Hi Andy



The way I normally get around this, is by using te <%set%> tag. i.e, in home.html;
<%set HomePage = 'TRUE'%>
... and then in include_header.hml;
<%if HomePage%>
<TITLE>Directory Home | Site Name</TITLE>
<%else%>
<TITLE><%Name%> | Site Name</TITLE>
<%endif%>



I haven't seen the set tag before.
<%set HomePage = 'TRUE'%>
Can you use this to set anything on a page.?

Re the above <%set HomePage = 'TRUE'%> will he need to use that on all other pages as well like search, add, modify etc.

Regards

minesite
Quote Reply
Re: [minesite] Combined include_header file In reply to
Quote:
I haven't seen the set tag before.
<%set HomePage = 'TRUE'%>
Can you use this to set anything on a page.?

Yeah, its quite a new tag. Good ol' GT never cease to suprise us :)

Quote:
Re the above <%set HomePage = 'TRUE'%> will he need to use that on all other pages as well like search, add, modify etc.

Sure, you can do it on any template. You can even do cool stuff like;

<%set NewID = $ID%>

... which would set <%NewID%> to the value that is held in $ID before Smile

Cheers

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!