Page 2 of 2

Re: Using the XML nodes

Posted: Wed Apr 23, 2008 7:43 pm
by JeremyBASS
Ok back to it... So I’m trying to round out this exercise in flexibility, which is really showing the power of this cms... so the last part of this is the “in and out” data needed to do anything great with flash and or flex.  So this is what I’m doing…

1.) I made two “XMLlinks” (the news detail template links) App_XMLread and App_XMLwrite
2.) Tried to place

Code: Select all

{capture assign='junk'} {cms_module module='FrontEndUsers'} {/capture}
<?xml version="1.0" encoding="utf-8"?>
but after that i was not sure where to go....
It seems to me that if i use the code below i'd get the listing of all the Group Properties

Code: Select all

{foreach from=$controls item=control}
  <tr>
    <td align="left">{$control->hidden}
    {if $control->color != ''}
      <font color="{$control->color}">{$control->prompt}{$control->marker}</font>
    {else}
      {$control->prompt}{$control->marker}
    {/if}
    </td>
    <td align="left">{$control->control}</td>
  </tr>
{/foreach}
but that is not really helpful...  How would I get them one by one... like if I just wanted the email... or the color they picked... or what ever. 

I would think that if I was to stick in App_XMLwrite this code:
(I know that not xml formatted code ;) )

Code: Select all

{capture assign='junk'} {cms_module module='FrontEndUsers'} {/capture}
<?xml version="1.0" encoding="utf-8"?>
{$startform}
 {if $controlcount > 0}
  <center>
  <table width="75%">
     {foreach from=$controls item=control}
  <tr>
     <td>{$control->hidden}<font color="{$control->color}">{$control->prompt}{$control->marker}</font></td>
     <td>
       {if isset($control->image)}{$control->image}<br/>{/if}
       {$control->control}{$control->addtext}
       {if $control->required != true}
         {if isset($control->control2)}{$control->prompt2} {$control->control2}<br/>{/if}
       {/if}
     </td>
  </tr>
 {/foreach}
  </table>
  </center>
 {/if}
 {$hidden}{$hidden2}{$submit}{$cancel}
{$endform}
I should be able to write back the information... I’m just not thanking that if I don't have the data got one by one then this wouldn't work..??????? a little help would be great at this point... I’m dead in the water lol... thanks calguy for sticking with me... and I’m hoping this is help someone else too...

Re: Using the XML nodes

Posted: Thu Apr 24, 2008 5:58 pm
by JeremyBASS
Hello, so i'm able to grab the data from the FEU but i can't figure out how to write it back, any ideas would be great... My thought was to try to have read from template... and then a write to template... have form in the write template so then have flash post the data?  all tries for this have failed so far... but i think i'm on the right track... any ideas would be great...

*****edit*****
when i said i was able to get the data... i was not able to call one item at a time.... I still need to figure out how to do that... Please any help on this would be great ... again thank you all... A big thanks to Calguy for the help...