Gossamer Forum
Home : Products : Gossamer Links : Discussions :

<%category%>????????????

Quote Reply
<%category%>????????????
Hi,
I posted several question in the location of:asking about using twoo languages dealing for Links SQL 2. I was advised to translate templates and group them into two 2 groups English and Arabic. It works and I duplicated page.cgi and SiteHTML.pm to let each on deal with diffrent field in the category table. I inserted new fields called namea and Full_Namea for arabic categories. The problem now that the drop down menus in add and modify pages still deal with english categories (english fields). I saw the following expression <%category%> and I could not understand how it can read from the english fields and I let it read from the arabic field for the arabic templates.
Can anybody help me in descriping these tags <%category%>, <%description%>, ...etc? Sorry I'm still a newbie.
thank you for your help.


[:P]
wewe
Quote Reply
Re: [wewe] <%category%>???????????? In reply to
Ok,

This is a little tricky, because of the way the generated category list uses the <%category%> variable.

What you might need to do, is make a <%category_arabic%> tag, and then duplicate the category drop-down routines at the bottom of the various scripts (add/modify)

I've hacked the category routines a few times to do different things, but it's really a "hack" and I think that is what you'll have to do, create a hack.

The <%category%> tag uses the standard category routines and fields, but the <%category_arabic%> uses the arabic category routines which pass the arabic fields in, rather than the english ones.

FWIW, I think the way the <%category%> tags are used and generated in the templates is quite possibly the most complicated user-interface item in Links SQL. It takes a little patience to understand how it's being passed in, modified, and returned.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] <%category%>???????????? In reply to
 
thank you Pugdog for your fast reply, but could you please be more specific because I searched for the routines you talked about but did not find them. So could you help a newbie about the commands that mut be inserted.
Also, I have another question.
As I mentioned previously, I inserted two fields in the category table: Namea and Full_Namea for arabic category names. I duplicated build.pm and nhp.buid.cgi to build two kind of pages index.html for english and indexa.html for arabic pages, and the arabic pages are supposed to use the arabic templates during the buil process, how can do that?
And when the arabic pages are built when I click on the arabic category name on the home page to open the subcategory in arabic but the related english subcategory will be opened, can you advise for that?
Thanks.


wewe
Quote Reply
Re: [wewe] <%category%>???????????? In reply to
Hi,
I examined the add.cgi and modify.cgi and found a subroutine category_list that list the category name. I modified the name of the category field "Full_Name" to "Full_Namea" which holds the arabic categories but nothing changed.
Please can any body help.
Thanks
wewe