If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
I need to write a conditional for the category screen which is true only if
the current category has child categories (IE: Is a parent category). Is
there a token that identifies a parent category?
I almost have it, but not really and don't understand why. I can get the
reverse of what I want to work perfectly, but when I reverse the
conditional, which logically should work - it doesn't work.
This seems strange and I hope someone will explain. If I want an expression
to evaluate true if the category is a child category, this works with no
problem:
%IF(Categories.d.parent_id)%
This category has a parent category - do this
%IFEND%
This works every time. But if I do this:
%IF(Categories.d.parent_id)%
This category has a parent category - do nothing
%ELSE%
This category has no parent category - do this
%IFEND%
The "ELSE" statement only works if the category is a top category. I can't
figure out how to reverse what works to identify a child category to
identify a parent category.
Can someone please suggest a new tactic?
Thank you
Dave Hauser
-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Aquapro
Sent: Thursday, May 05, 2005 6:40 PM
To: Merchant-Users@Miva. Com
Subject: [mru] Token for Parent Category?
Hi All:
I need to write a conditional for the category screen which is true only if
the current category has child categories (IE: Is a parent category). Is
there a token that identifies a parent category?
Home »
<a
href="merchant.mvc?Screen=CTGY&Category_Code=%VAR( Categories.d.code)%">
%VAR(Categories.d.name)%</a>
%IFEND%
%IFEND%
Andreas Toman
PCINET, LLC
Miva Development, Installation & Upgrade
"E-commerce is the next step in the evolution ..." www.pcinet-llc.com
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Aquapro
Sent: Friday, May 06, 2005 10:11 AM
To: Merchant-Users@Miva. Com
Subject: [mru] Conditional true if Parent Category?
I almost have it, but not really and don't understand why. I can get the
reverse of what I want to work perfectly, but when I reverse the
conditional, which logically should work - it doesn't work.
This seems strange and I hope someone will explain. If I want an expression
to evaluate true if the category is a child category, this works with no
problem:
%IF(Categories.d.parent_id)%
This category has a parent category - do this
%IFEND%
This works every time. But if I do this:
%IF(Categories.d.parent_id)%
This category has a parent category - do nothing
%ELSE%
This category has no parent category - do this
%IFEND%
The "ELSE" statement only works if the category is a top category. I can't
figure out how to reverse what works to identify a child category to
identify a parent category.
Can someone please suggest a new tactic?
Thank you
Dave Hauser
-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Aquapro
Sent: Thursday, May 05, 2005 6:40 PM
To: Merchant-Users@Miva. Com
Subject: [mru] Token for Parent Category?
Hi All:
I need to write a conditional for the category screen which is true only if
the current category has child categories (IE: Is a parent category). Is
there a token that identifies a parent category?
Comment