Hi,

Regarding the simpler JQuery code:

<ul id="carousel-<%inf_page_id%>">
    <!IoRangeList>
    <!IoRangeRedDotMode><!-- <%lst_feature%> --><!/IoRangeRedDotMode>
    <li><a title="<%hdl_title%>" href="javascript:;"></a></li>
    <!/IoRangeList>
</ul>
<script type="text/javascript"
    $('carousel-<%inf_page_id%> li').each(function(index){
        $(this).prepend(index+1);
    });
</script>

I noticed that you are using a list to generate the numerical slider 
buttons, I assume the content of each slide is output via a container, and 
the slide pages are connected to the container instead of the list?  If 
not, one will end up with some slider code snippets being published, well, 
unless one is using content class without template, which I personally 
think it should not be taught as part of product training.  Anyways, please 
see attached image, I use this method to generate sliders.

Best regards,

-Jian

On Tuesday, April 23, 2013 1:05:42 AM UTC-4, [email protected] wrote:
>
> Hi, Richard.
>  
> We're using the counter as a visual thing for the user. Basically, it 
> allows the user to choose which pane of the slider to display.
> <https://lh4.googleusercontent.com/-c9xFeq6Zik8/UXYWcVwMeXI/AAAAAAAAAAM/HRXjoU5m9rU/s1600/slider-00.PNG>
>  
>
>  
> Regards,
> EMB
>
> On Tuesday, April 23, 2013 2:31:34 PM UTC+10, Richard Hauer (5 Limes) 
> wrote:
>
>>  If you don’t need the counter, just use the normal list tag and don’t 
>> use render tags for this purpose.
>>
>>  
>>
>>  
>>
>> *From:* [email protected] [mailto:[email protected]] 
>> *On Behalf Of *[email protected]
>> *Sent:* Tuesday, 23 April 2013 1:09 PM
>> *To:* [email protected]
>> *Subject:* Re: Modifying the <foreach> counter
>>
>>  
>>  
>> 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] [mailto:[email protected]] 
>> *On Behalf Of *Jian Huang
>> *Sent:* Tuesday, 23 April 2013 12:10 PM
>> *To:* [email protected]
>> *Cc:* [email protected]
>> *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] 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].
>> 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.
>>  
>>  
>>
>> -- 
>> 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.
>>  
>>  
>>
>> -- 
>> 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.
>>  
>>  
>>
>
<https://lh4.googleusercontent.com/--XbH72y1OOo/UXkoimNI6sI/AAAAAAAAAYM/RWwiSMDtyDk/s1600/2013-04-25_085830.jpg>

-- 
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.


<<attachment: 2013-04-25_085830.jpg>>

Reply via email to