Importing flexicontent items

More
11 years 7 months ago #29026 by mpearl
I've written code to gather xml formatted content from several external sources, then import them as FC items. I'm only concerned about a single FC item type for the time being.

Two questions:

1 - What data is required for me to create a new item?
2 - What is the best way for me to import each new item programmatically?

Thanks!

Mike

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #29027 by ggppdk
Replied by ggppdk on topic Importing flexicontent items
FLEXIcontent backend items controller (controllers/items.php) has a task for importing (function import() )

this task is called by the backend FLEXIcontent import CSV view (views/import/view.html.php)

Because this view is configurable maybe you could use it without any changes

so, have you checked out the import view?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #29028 by mpearl
Replied by mpearl on topic Importing flexicontent items
I have not, but will, thanks.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #29029 by mpearl
Replied by mpearl on topic Importing flexicontent items
How is the csv file formatted? Is there any documentation on the import view?

Is there a way to pass the data along to the importcsv() method?

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #29033 by ggppdk
Replied by ggppdk on topic Importing flexicontent items
CSV file Format?

If you click to the backend FLEXIcontent import tab, you will see the configuration option and an sample file,

-- you can have different format if you want, but there is a suggested format there

-- the import task works by parsing the data from the CSV file and passing them to the store() function of the item's model,

-- it supports fields that have multiple properties per field value (see example), to see the name of the properties open for e.g. email field, open file plugins/flexicontent_fields/weblink/weblink.php (but for weblink the name of the properties is also in the example)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #29266 by mpearl
Replied by mpearl on topic Importing flexicontent items
I have been able to import messages with this wonderful new feature. Is it possible to use FlexicontentControllerItems::importcsv() from within a joomla cli script - for cron job use? Or possibly possibly create an option to kick this off as a cron job?

How would I call it?

Thanks!

Mike

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.293 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline