Gossamer Forum
Home : Products : Gossamer Links : Discussions :

4 columns on homepage, 2 columns on site

Quote Reply
4 columns on homepage, 2 columns on site
Hi,
I'm looking for a method for have 4 columns of categories on homepage, and normal 2 columns on the rest of site.

I "lurk" a lot the forum, and the only solution I find is to remove, in the home.html, the placeholder <%category%> and put the loop:

Code:
<%loop category_loop%>
<%include subcategory.html%>
<%endloop%>

Ok, I have a single column, but on the top, I have this error:


Unknown Tag: 'Short_Name' (Unknown Tag: 'Number_of_Links')

So, I need a solution! Smile if someone has solution or suggestion... Thanks!

Quote Reply
Re: [skop] 4 columns on homepage, 2 columns on site In reply to
... No one?Crazy
Quote Reply
Re: [skop] 4 columns on homepage, 2 columns on site In reply to
No one!Pirate
Quote Reply
Re: [skop] 4 columns on homepage, 2 columns on site In reply to
Hi,

Are you using;


Code:
<%if category_loop%>
<%loop category_loop%>
<%include subcategory.html%>
<%endloop%>
<%endif%>

Always try and "if" values, just in case they don't exist =)

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: [skop] 4 columns on homepage, 2 columns on site In reply to
Hi,

It might be possible with some code I have, where if you set <%set HOME=1%> in your template, you can use an:

if ($tags->{"HOME"}) {
set $num_cols=4
} else {
set $num_cols=2
}

You would use my function, and work with the category_loop tag, to make the home page display in 4 columns, and any other page 2 columns.


If you would like this, contact us on http://ultranerds.com

This is part of a paid plugin, and I'd have to customize it slightly to run independently, but you'd probably be able to just copy a .pm file to your Plugins directory and call it from within the templates as :

<%Plugins::CategoryCols::home_page($category_loop)%>
<%Plugins::CategoryCols::sub_page($category_loop)%>

You could also edit the Build.pm file to not use the $CFG-> parameter, but hard-code the number of columns.

For something this benign and trivial, editing the file is an "ok" thing, as long as you make a note that you need to do that during a new upgrade.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.