Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Customized Category menu
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Trial_and_Error
Starting Member

36 Posts

Posted - October 14 2008 :  05:01:54  Show Profile  Reply with Quote
Hello,

Instead of the command <%NavigateShowCategoryList%> I want to make my own customized category menu. I want to place the different links to my different categories in a table structure.

But being new to VPASP, I do not exactly know how to do this. In the manual, I find an example for creating a link for category with id=2 :

<a href="shopdisplayproducts.asp?id=2">Display Travel Products</a>

But how can I make the name of the category dynamic (in this case "Display Travel Products")?

I want the name of the hyperlink to be displayed as the corresponding category name which was written in the database and also that it will be correctly translated in case I change the language.

I hope this will be possible?
Thanks anyway for any assistance.
Trial_and_Error

anatur
Starting Member

42 Posts

Posted - October 15 2008 :  11:44:43  Show Profile  Reply with Quote
Hello,

As fare as I know it is not possible to get only one category name out dynamic. And when something is not possible - you usualy not get any responce. I was very interesting this myselves - because it would then be possible to split the categories in different sections with headings.

However it is usualy some ways around things. If you accept to have the directories names to update in two places it is possible. You normaly not change the directories name often when the shop is up working anyway.

In the language section - you make a new language record - one for each directory name. With keyword as f.ex. "languagedirectoryone" - "languagedirectorytwo" - and three - four and so on. Then you can give them your directory name as caption in different languages.

Then in shop as you started with:

<a href="shopdisplayproducts.asp?id=2">Display Travel Products</a>

it will be like this:
<ul>
<li>
<a href="shopdisplayproducts.asp?id=1"><%=Server.HTMLEncode(getlang("langdirectoryone"))%></a>
</li>
<li>
<a href="shopdisplayproducts.asp?id=2"><%=Server.HTMLEncode(getlang("langdirectorytwo"))%></a>
</li>
</ul>

hope this helps

Terje

Edited by - anatur on October 15 2008 11:47:00
Go to Top of Page

Trial_and_Error
Starting Member

36 Posts

Posted - October 15 2008 :  15:47:10  Show Profile  Reply with Quote
Hello Anatur,

Thanks for your reply.

I did find myself also a workaround.

I defined some new language records with some logic in it, for example langCat7 for the category with id=7, langCat5 for category with id=5,....

I made some links like :

<ul>
<li>
<a HREF="shopdisplayproducts.asp?id=7">- <%= getlang("langcat7")%></a>
</li>
<li>
<a HREF="shopdisplayproducts.asp?id=5">- <%= getlang("langcat5")%></a></li>
</ul>


In this way, I only have to define once the correct translations for the corresponding categories. It is quite simple and I can live with that workaround.

I will test your proposal also. Probably it will work.

Thanks for your reply!

Trial and Error
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00