| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
#1
|
|||||||
|
|||||||
![]() I have been messing with this problem on and off for a good day now, here's the deal.
The following code is used in my categories.tpl file to display each category Code:
The problem is that when the category title extends to a second line (because it exceeds 23 characters) the link does not carry the categoryid number in the URL. Here are two examples or typical links... Working URL Example (top line): http://www.thewebsite.com/store/customer/home.php?cat=328&XCARTSESSID=6dea0fbfecc8864014e6f b291cf8df0a Non-Working URL Example (bottom line): http://www.thewebsite.com/store/customer/home.php?cat=.categoryid&XCARTSESSID=6dea0fbfecc88 64014e6fb291cf8df0a Thanks in advance to anyone who can solve this. I am drawing a blank. ![]() |
|||||||
#2
|
|||||||
|
|||||||
![]() Cant you just change this to:
Code:
__________________
ex x-cart guru ![]() |
|||||||
#3
|
|||||||
|
|||||||
![]() Hi FD,
Yeah I had that, but the problem is that the underline that designates the link is then underlining the \n. I don't want to add the "text decoration: none" to the CSS so I am left with trying to figure out how to 'restart' the link. According to smarty.php.net it says I should simply leave off the smarty designators {}, but as you can see, no luck. It's weird the '$categories[cat_num].categoryid' is being interpretted, but I can't figure out how. See how in non-working link the '$categories[cat_num]' doesn't show up, but the .categoryid does? Maybe I need some quotes or something? Thanks for the suggestion. Any others? You think Boomer might know? ![]() |
|||||||
#4
|
|||||||
|
|||||||
![]() How about putting in {assign var="temp" value=$categories[cat_num].categoryid} before this and using $ as the href
<a href="home.php?cat={$temp}">
__________________
ex x-cart guru ![]() |
|||||||
#5
|
|||||||
|
|||||||
![]() No can do, because it puts two smarty tags - {$temp} - inside of two other smarty tags. I tried leaving them off, but then the value simply doesn't show up. I also tried the {ldelim} and {rdelim} tags, but that too did not work.
Fun heh? ![]() There has to be a way, and I am betting it is simple. I just don't see it, yet. Thanks again. I definitely welcome more input. |
|||||||
#6
|
|||||||
|
|||||||
![]() Sorry I didn't make myself clear, try this:
Code:
__________________
ex x-cart guru ![]() |
|||||||
#7
|
|||||||
|
|||||||
![]() Doh...
Here's what I get when I add in the code... Parse error: parse error in /home/thewebsite/public_html/store/templates_c/%%-12/%%-1253885908/categories.tpl.php on line 50 |
|||||||
#8
|
|||||||
|
|||||||
![]() I've just used that code and it worked fine for me. Are there any other problems in the templates that you changed.
__________________
ex x-cart guru ![]() |
|||||||
#9
|
|||||||
|
|||||||
![]() Hmm... I defaulted back to the original categories.tpl and it worked. I'll mess with it a bit and let you know the success story.
Excellent code, I must admit I did think about assigning a temporary variable like you did, but was too stubborn to implment it. Great work FD! If you ever run for office, let me know. ![]() |
|||||||
#10
|
|||||||
|
|||||||
![]() Got it now, works perfectly. Thanks again.
|
|||||||
|
|||
X-Cart forums © 2001-2020
|