jackmm
I'm new here

WebEdit populating same information on form on item listing(5 items)

Hi,

I am struggling to edit individual section records in my WebEdit using the below code snippet. Everytime I edit edit a certain record its always populating 1 record which happens to be the last record in the data source.

I thought of using FS_LIST to try overcome this but, FS_LIST doesnt give me some felxibility I want to achieve with this section. Your prompt response will be appreciated. Anyone who have some advice on this please give guidance. Thanks.

<div id="site-banner-outer">

    <div class="image_reel">

        $CMS_FOR(alist, list_function)$

         

          $CMS_RENDER(template:"WEBeditInplaceEditBegin")--$

            $--CMS_IF(alist.start_date <= #global.now && alist.end_date > #global.now)--$       

               

                $-- Inner code --$

                <div id="site-banner" style="background: transparent url('$CMS_REF(alist.banner_image)$') no-repeat top left;">

                    <div id="banner-links">   

                        <ul id="banner-links">   

                             My other value listing here....           

                        </ul>       

                    </div>   

                </div>           

           

            $--CMS_END_IF--$

           $CMS_RENDER(template:"WEBeditInplaceEditEnd")$

        $CMS_END_FOR$       

    </div>  

</div>

Labels (1)
0 Kudos
1 Reply
maaroufi
I'm new here

Re: WebEdit populating same information on form on item listing(5 items)

Hello Jack,

if you want to edit datasources you can first of all use the contentSelect function e.g.:

<CMS_HEADER>

    <CMS_FUNCTION name="contentSelect" resultname="myCont">

            <CMS_PARAM name="schema" value="Products"/>

                 <QUERY entityType="Press_Releases">

                </QUERY>

    </CMS_FUNCTION>

</CMS_HEADER>

where Products should be replaced by your schema name and Press_Releases by your entity type.

Furthermore you can use the following code for example:

$CMS_FOR(e,myCont)$

    <div><b>Datasource-ID $CMS_VALUE(e.getValue("fs_id"))$:</b>             $CMS_RENDER(template:"WEBeditEditContent",content:"Products.press_releases",index:e.getValue("fs_id"))$

    </div>

$CMS_END_FOR$   

Here you get the datasources and a button for each datasource to edit the datasource section. It is a simple example. Products.press_releases should be replaced by the table template uid of your datasource.

Greetings

Ismail

0 Kudos