Gossamer Forum
Home : Products : Gossamer Links : Discussions :

<%category_loop%> issues

Quote Reply
<%category_loop%> issues
Hi All,

We are doing something a bit different (or trying to).

We have the Category Short_Name (using Category_Loop) on a left hand menu that we always display on every page.

When I click on a Category Name and go to it's page, the Category list that shows up in our Nav changes to the Links

info for the category itself.



How can I keep the same code on every page, no matter where?



Thanks.
Quote Reply
Re: [blakey] <%category_loop%> issues In reply to
Hi,

Hmm, I'm not sure exactly what you are doing, but if you want the same thing on every page, don't use template tags, just write out exactly what you want as HTML.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] <%category_loop%> issues In reply to
Thanks for the reply.

I know that I can hardcode what I want, but I wanted to make it dynamic as possible...
Quote Reply
Re: [blakey] <%category_loop%> issues In reply to
I did something similar, I think.

What I did was put that code into a file, that was compiled during the build process (and outputted as a text file) and then included on each page. This way I had my main categories always on my side bar.

What I *think* you are asking, is to prevent a template from parsing the sidebar with the current data.

In that case, what you need to do is create include files that you include, and which are parsed based on a "seed" value, or hard-coded value for that included template.

Alternatively, you could use a combination of a template and global. The reason for the template, was to cut the overhead of parsing the same data every time, just include the file already parsed, since the category layout rarely changed.

If I knew the specifics of what you were trying to do, I might have a better solution.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] <%category_loop%> issues In reply to
Hi There,

I am doing exactly what you are saying... trying to keep my categories on the side bar.
I guess you're right, they don't change all that much...

Right now I am just using <%category_loop%><%Short_Name%><%endloop%>

I will try including the already parsed file.



Thanks again.



Blakey