Hi, Jian and Richard.
 
Thanks for your responses.
 
@Jian: 
I try to avoid using preexecutes. I was taught that preexecutes usually add 
a performance hit. The client I'm working for is using quite a few 
preexecutes and I don't want to add to them unless neccessary. 
 
@Richard:
The list items are used by a jquery slider as the tab navigation for the 
items in the slider. This section is just spitting out the <li> and anchors 
so the css and jquery can manipulate them later.
 
Regards,
EMB
 

On Tuesday, April 23, 2013 12:42:11 PM UTC+10, Richard Hauer (5 Limes) 
wrote:

>  Silly question, but is there a reason you don’t want to use a simple 
> list tag to emit the <ul>?  There are million ways to add the 1,2,3 on the 
> client side if you must.
>
>  
>
> Are you generating simple HTML, asp.net or something else?
>
>  
>
>  
>  
> *From:* [email protected] <javascript:> [mailto:
> [email protected] <javascript:>] *On Behalf Of *Jian Huang
> *Sent:* Tuesday, 23 April 2013 12:10 PM
> *To:* [email protected] <javascript:>
> *Cc:* [email protected] <javascript:>
> *Subject:* Re: Modifying the <foreach> counter
>
>  
>  
> Ah, the grail of rendertag question.  Type conversion.  Store:counter is 
> returned as Int32, but rendertag doesn't support arithmetic.  If you do 
> .ToString() and then see if then see if there are any functions in the 
> String class that support anything or something that can further your need.
>  
>  
>  
> In short, most likely no, there is one way I know, but it involves pseudo 
> arithmetic using ifs and strings.
>  
>  
>  
> Try preexecution?
>  
>  
>  
> The other way is to use JQuery, way less clunky JavaScript.   
>
> Sent from my iPhone
>  
>
> On Apr 22, 2013, at 9:37 PM, [email protected] <javascript:> wrote:
>
>  Hi, everyone.
>  
>  
>  
> I'm not very experienced in using the <foreach> but I've been able to get 
> it to partially work for my needs. There is one minor remaining thing that 
> I'm sure can be done cleaner but I'm not sure how to go about it. 
>  
>  
>  
> Basically, I trying to output the contents of a list Element as 
> an unordered list items containing sequential links 
>  
>  i.e.:
>  
>  
>  
> <li><a class="" title="" href="">1</a></li>
>  
> <li><a class="" title="" href="">2</a></li>
>  
> etc.
>  
>  
>  
> Here is what I have:
>  
>  
>  
> <reddot:cms> 
>     <foreach itemname="item" 
> object="Context:CurrentPage.GetElementByName(lst_feature).Value" 
> countername="counter"> 
>         <htmltext> 
>                 <li><a class="" title="<%!! Store:item.Headline !!%>" 
> href="javascript:;"><script>document.write(<%!! Store:counter !!%> + 
> 1);</script></a></li>
>         </htmltext> 
>     </foreach> 
> </reddot:cms> 
>  
>  
>  
> I don't like using the JavaScript there. Just seems really clunky. I'm 
> sure there is a cleaner way to do this. 
>  
>  
>  
> Any wisdom is much appreciated.
>  
>  
>  
> Thanks and regards,
>  
> EMB
>  
>  
>  
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "RedDot CMS Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected]<javascript:>
> .
> Visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "RedDot CMS Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected]<javascript:>
> .
> Visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to