Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Category Template does not go down

Quote Reply
Category Template does not go down
When I used the old Category Templates plug in, if you used a custom template for a for a "higher" cat, the custom template "followed down" through all the child categories. Links 3 does not seem to be doing that. Am I missing a global or something to make the custom template trickle down... or am I gonna have to copy 100's of template names?
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Category Template does not go down In reply to
Category Template plug-in? Are you talking about the Category_Template column?

Adrian

Last edited by:

brewt: Apr 9, 2005, 11:05 PM
Quote Reply
Re: [brewt] Category Template does not go down In reply to
Adrian:

You're up late!
Yep- that is what I want.

I set up "Warner Bros." to use "category_wb.html"... and in 2.X, something like "Warner Bros./Animaniacs" would also use that custom template-even if the Category Template field is blank. In 3.0, it looks like I have to edit "Animaniacs" also....
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Category Template does not go down In reply to
Here's a sample (test site)

http://66.219.198.216/...ion%2Findex.html;d=1

This has the WB TV template (notice the broken image at the top)

http://66.219.198.216/...acs%2Findex.html;d=1

One level down, should use the same template, but desn't- notice the lack of broken image.
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Category Template does not go down In reply to
It's only 11pm :)

I tried it on my copy and it's working. It works as it did in 2.x. Try editing your category.html and putting "Category_Template: <%Category_Template%>" to see what it's set to.

Adrian
Quote Reply
Re: [brewt] Category Template does not go down In reply to
For the aove example- the animaniacs sub page reads:

Category_Template: "


with that code added...
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Category Template does not go down In reply to
Not sure, but could it have something to do with this:

<%if Category_Template and Category_Template ne 'category_bray.html'%><%include $Category_Template%><%endparse%><%endif~%>

I keep that on all my custom Cat pages, just changing th part I bolded...

dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Category Template does not go down In reply to
That's just put in to make sure the template doesn't get included recursively (even though GT::Template has code to prevent it).

One thing I can think of is that your Category tree might be incorrect. Try rebuilding your category tree.

Adrian
Quote Reply
Re: [brewt] Category Template does not go down In reply to
Thanks for your help Adrian!

Whoops! After running about 20 secs, I get this:

A fatal error has occured:
Can't call method "fetchrow" on an undefined value at GT::SQL::Tree::create line 235.

Please enable debugging in setup for more details.

This is a test install install, so I am OK. There was a problem when I upgraded 2.99.1=>3.0.0- should I reinstall?

I do plan on doing a full, brand new (with current) install from blank when I go live.

I am having a couple weird problems like this- my Fileman is not working, other weird things.
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Category Template does not go down In reply to
OK, I did a full, brand new, clean install, and I am still getting:
Can't call method "fetchall_list" on an undefined value at GT::SQL::Tree::pre_update line 362. When I try to use Browse to modify any category. Whe I do the "Rebuild Category Tree, I get:Can't call method "fetchrow" on an undefined value at GT::SQL::Tree::create line 235. I tried resyncing thre Cat def files, and that worked fine, but still getting these errors. Any ideas?
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Category Template does not go down In reply to
OK, I ran debug, and I found the problem... Category has no field "CatRoot" in it!

The actual error is:

GT::SQL::error = Failed to execute query: 'SELECT ID,CatRoot,FatherID,CatDepth FROM Category WHERE (CatRoot > ? AND CatRoot <= ?) ORDER BY CatRoot, CatDepth': Unknown column 'CatRoot' in 'field list'

Looking at Category, I do note it also does not have CatDepth.

What should I do at this point????
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Category Template does not go down In reply to
So I added Catroot and Catdepth to Categories, Built the Cat Tree, and now things seem to be working well...

But note- these were not built in a normal build or rebuild of MySQL tables.
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Category Template does not go down In reply to
How did you manage to get your install to have no CatRoot column?! How did you do the install (fresh 3.0.0 install, then import, etc)?

Adrian
Quote Reply
Re: [brewt] Category Template does not go down In reply to
First I did a blank install of 2.99.0 (=>2.99.1=>3.0.0), then I copied over all the data from the Live install (Therby probably going back to the 2.X type of Category fields)

When I started to figure out there was a problem with missing fields and all, I TRIED to reinstall the MySQL tables, but the system told me everything was up to date. This included AFTER I erased the category_Tree table and .def files completely- the reinstall still told nme I had this table!

SO I just installed again with a different prefix, and copied over all the table info... and that made it work.
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Category Template does not go down In reply to
Doing it like that probably isn't the best idea since your def files will be out of sync. If you're going to be using 2.x type database, then it'd be best that you install 2.2.1, import your database, then upgrade it to 3.0.0. If you want to have a clean slate file wise, then I'd dump the database at that point, delete all the files and drop the databases, install 3.0.0 and undump your database.

Adrian
Quote Reply
Re: [brewt] Category Template does not go down In reply to
I too am finding that the Category_Template field is not inherited by subcategories. (v3.0 & 3.01) dynamic.

I use category2.html for a series of categories and then revert back to category.html for the subcategories of these categories- deeper subcategories are still showing category2.html even though the field is blank within the record.

It worked OK in v2.x

I have already rebuilt the category tree and checked that the catroot and catdepth fields are set within the database.
Quote Reply
Re: [Alba] Category Template does not go down In reply to
If you send me shell access (need to be able to modify glink's files) as well as admin access I can try track it down.

Adrian