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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Importing in the Admin Section to multiple tables.


Go to End


2 Posts   1688 Views

Avatar
sarahk

Community Member, 46 Posts

1 April 2008 at 11:44pm

Edited: 01/04/2008 11:46pm

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

Community Member, 46 Posts

2 April 2008 at 11:08am

Edited: 02/04/2008 11:27am

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