'parentNum' numbers issue

3 posts by 2 authors in: Forums > CMS Builder
Last Post: September 16, 2013   (RSS)

By CarlosPinedo - September 14, 2013 - edited: September 14, 2013

Hi

I'm trying to use 'parentNum' field number to define the class of a 'name' :

<li><a href="<?php echo htmlencode($listRecord['_link']) ?>" class="bll_ora<?php echo htmlencode($listRecord['parentNum']) ?>"><?php echo htmlencode($listRecord['name']) ?></a></li>

My classes are: "bll_ora0" , "bll_ora1", "bll_ora2", "bll_ora3",  "bll_ora4" , so the idea it´s that the final digit changes depending of the 'parentNum numbe

the problem is that only from the, top level categories, and, second level categories, I can get a predictable number: "0" for the top level categories and "1" from the second level categories. After, is caos, For instance, the numbers that I get from third level categories are as different as 2 or 10 or 13. 

So i guess my question is how does it work the 'parentNum' field numbers, especially after third level categories. And, is it possible to obtain predictible numbers out of the parentNum field ?

Thanks a lot Jason!

Carlos