Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
I see <cms:folders > can have a parameter 'name'. Is it already implemented?
I guess, it will work then as pages tag now works - <cms:folders name=some_name >.
Well, this is minor issue, results can be replicated with if statement inside.

Now, I parse a CSV, it contains data on product-title and product category. While this file is small for testing purposes, I believe real life situation is different. Thousands products and tens (or hundreds) hierarchical categories. CSV specifies them as parent folder, sub folder.

I've searched the whole forum (as usual) before posting this. The solution is on the table:
go through all *PRE*existing folders, check if the folder title from csv matches the folder in template. Any values should not be set beforehand. I want to recreate structure from scratch, rather than scan and create manually. How can I achieve that? This is very much needed!
Another solution is to use relation with pages, which serve as 'folders'. But this is not desirable. It will kill the ability to work with image galleries, which are actual folders for this template.

Please, help! ...---...
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
I'm afraid, @trendoman, as of now it is not possible to create folders using cms:db_persist.
KK,

Maybe extended folders' shadow page can help? A new page in master template would autocreate a new folder, for example.

What about raw php to insert a folder into database?

Also to modify template file physically also with php, adding there hardcoded <cms:folder> and refresh the page?
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
What about raw php to insert a folder into database?

That avenue is always available, @trendoman :)

You can study couch/edit-folders.php (used in admin-panel to manage folders) to see how to programmatically handle folders.
4 posts Page 1 of 1