Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Importing in the Admin Section to multiple tables.


Reply

2 Posts   1514 Views

Avatar
sarahk

1 April 2008 at 11:44pm (Last edited: 1 April 2008 11:46pm), Community Member, 46 Posts

I'm taking another crack at developing this.

Following the tutorial at http://doc.silverstripe.com/doku.php?id=leftandmain I've got my console page showing that I can add menu options to etc.

What i need now is to build a form on the right to select a CSV file and upload it. I'll then work through the csv and
* parse the data (easy)
* add each row to the data table objects
* save

Are there any examples of this being done? I'd love to shorten my learning curve by seeing how others have done it.

thanks

Sarah

ps: using ulist in this post gave very unexpected results!

Avatar
sarahk

2 April 2008 at 11:08am (Last edited: 2 April 2008 11:27am), Community Member, 46 Posts

Here's an example of what I need to know...

<% control Items %>
   <li id="record-$class">
   <a href="admin/rents/show/$ID">$Title</a>
</li>
<% end_control %>

How do I add to the Items array? I've ended up hardcoding it but it would be good to work it properly.

edit: just reviewed the forums code and seen that the Items array is ignored in favour of a coded tree