Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Why Isn't The Category Automatically Carried?

Quote Reply
Why Isn't The Category Automatically Carried?
When I click on "Add URL" from within my Links directory, I was under the impression that the category where I am in would autmoatically be carried to the "Add URL" page instead of listing the hundreds of categories.

In my case, it doesn't... no matter where I enter the "Add URL" page from, all the categories are listed.

Does anyone know why this would be happening, and how I might address this? Perhaps if someone could paste the code that handles this o I can check it against mine?

Much appreciated as always!

Quote Reply
Re: Why Isn't The Category Automatically Carried? In reply to
In Links.pm look for this:

Code:
# Set to one to have Links generate a category list, set to 0 to use
# the category id.1
$LINKS{db_gen_category_list} = 0;
If yours is set to '1', change it to '0' and try again - does make it that work how you expected?

All the best
Shaun

Quote Reply
Re: Why Isn't The Category Automatically Carried? In reply to
Thanks for the quick reply!

That looks like part of the problem; however, after building, when I go to Add a URL from a category, I get the following error:

Oops, we had the following problem: Please go to the category you want to add to, and click add from there.

It doesn't seem to be carrying the category ID properly. How do I fix this?

Quote Reply
Re: Why Isn't The Category Automatically Carried? In reply to
Look in the templates for either footer.txt or category.html whichever has the 'Submit' link in it and make sure you're passing the category ID to add.cgi:

e.g.; <a href="<%db_cgi_url%>/add.cgi?ID=<%category_id%>">Suggest a Site</a>

Is it working OK now?

All the best
Shaun

Quote Reply
Re: Why Isn't The Category Automatically Carried? In reply to
Hey SHaun,

Yup, it's now working... thanks! Now, one question: is it also possible to create a page that will list all of the catgeories for internal use?

For instance, I will be adding to all different categories and would rather do it via the form than the admin.

Quote Reply
Re: Why Isn't The Category Automatically Carried? In reply to
I haven't done it myself but I think you'd have to create/modify links to give you the 'select' field version of the cats, and call it from a different form?

Maybe someone else can come in here ....

All the best
Shaun

Quote Reply
Re: Why Isn't The Category Automatically Carried? In reply to
Ok guys, this answers the question I had, BUT...
Now on the home and search templates, if you add the same category_id query to the end, then the add page leaves the category blank.

Is there any 'coverall', in that if the category isn't passed along (like from the search results page, or home page) then it automattically puts the category list in?

Thanks,

Chad

Quote Reply
Re: Why Isn't The Category Automatically Carried? In reply to
I already replied to your duplicate Thread.

Regards,

Eliot Lee

Quote Reply
Re: Why Isn't The Category Automatically Carried? In reply to
Uh, Eliot... I appreciate the response, BUT this is the FIRST time that I have asked this. If your replied to someone else, plese let me know how to find that thread so I can find the solution.

Thanks,
Chad

Quote Reply
Re: Why Isn't The Category Automatically Carried? In reply to
My apologies...anyway, I just replied to a similar Thread today:

http://www.gossamer-threads.com/...w=collapsed&sb=5

Regards,

Eliot Lee

Quote Reply
Re: Why Isn't The Category Automatically Carried? In reply to
Thanks, but I must be missing something because I added the category_id query to the category page - it works. But when you go from a different page (let's say home.html) it gives the error message "please go to the category and add a link".

You can see it at http://www.lessonplansearch.com

Thanks for your help,

Chad

Quote Reply
Re: Why Isn't The Category Automatically Carried? In reply to
Any Ideas???

Quote Reply
Re: Why Isn't The Category Automatically Carried? In reply to
Right as I stated before in that other Thread...you can use different Add Site links in your other template pages...

Code:

<a href="<%db_cgi_url%>/add.cgi">Add Site</a>


Use multiple header/footer template files for your other template files than the category.html template file.

This is a recording....

Regards,

Eliot Lee