Mass Adding of Pages
Permalink
I have a template ready, and a page created, and now I need to create about 150 more of them!
It is an insane nightmare to drag and drop one page at a time, each time having to select copy, say OK to the dialog, wait for the page to refresh, etc. I am looking for a fast way to streamline this process. Any ideas?
I can't seem to find any really fast ways to edit/move/copy mass files!
Please, if anyone can help... let me know!
Thanks,
Darren
It is an insane nightmare to drag and drop one page at a time, each time having to select copy, say OK to the dialog, wait for the page to refresh, etc. I am looking for a fast way to streamline this process. Any ideas?
I can't seem to find any really fast ways to edit/move/copy mass files!
Please, if anyone can help... let me know!
Thanks,
Darren
this page shows you how to to a lot of things using the c5 api:
http://www.concrete5.org/help/building_with_concrete5/developers/mv...
It takes a while to script a complex site but it definitely works. But 150 pages isn't that much, not sure if it's really worth the effort. But it's more fun to write a script than creating 150 pages manually for sure ;-)
http://www.concrete5.org/help/building_with_concrete5/developers/mv...
It takes a while to script a complex site but it definitely works. But 150 pages isn't that much, not sure if it's really worth the effort. But it's more fun to write a script than creating 150 pages manually for sure ;-)
remo's right, you can write a script, but what does that really buy you? You still need to put content on these pages and get em lookin right.
When we built schoolPulse.com and had to make several hundred thousand areas, one for each school in the US, which each included a photogallery, calendar, and message board - yeah we wrote a script...
150 pages? Just open a beer and start clicking.
When we built schoolPulse.com and had to make several hundred thousand areas, one for each school in the US, which each included a photogallery, calendar, and message board - yeah we wrote a script...
150 pages? Just open a beer and start clicking.
I've the same problem and I need to create about 1100 pages!
I'm thinking of creating a new page type, create all the blocks required as "Defaults" for this type and create the pages & dump the contents directly into the database. What do you think? is it a good idea?
Is there any description of db structure? Can somebody help me on how to do dump the contents & link the blocks on the DB?
Thanks.
I'm thinking of creating a new page type, create all the blocks required as "Defaults" for this type and create the pages & dump the contents directly into the database. What do you think? is it a good idea?
Is there any description of db structure? Can somebody help me on how to do dump the contents & link the blocks on the DB?
Thanks.
If you figure it out (sorry, I know nothing about sql) I'd like to help if I can in any way (I'm mostly a graphic artist, though, doubt I can do much!) let me know -- I'm perpetually interested in this.
Kino has a package that will most likely be out soon where it will create pages from a .csv file
Thanks introduced.
I'm complete make package.
Application procedures are promoted to the marketplace.
However, much is going to be released first.
So I want to use it first.
Csv file that contains reference together.
name,handle,pagetype,theme(,parent)
------------------------------------------
page1, page_1, left_sidebar,default
page2, page_2, right_sidebar,default
page3, page_3, full,default
page4, page_4, left_sidebar,greensalad,page_1
page5, page_5, right_sidebar,greensalad,page_1
page6, page_6, right_sidebar,greensalad,page_5
page7, page_7, right_sidebar,greensalad,page_5
page8, page_8, right_sidebar,greensalad,page_7
page9, page_9, right_sidebar,greensalad,page_8
I'm complete make package.
Application procedures are promoted to the marketplace.
However, much is going to be released first.
So I want to use it first.
Csv file that contains reference together.
name,handle,pagetype,theme(,parent)
------------------------------------------
page1, page_1, left_sidebar,default
page2, page_2, right_sidebar,default
page3, page_3, full,default
page4, page_4, left_sidebar,greensalad,page_1
page5, page_5, right_sidebar,greensalad,page_1
page6, page_6, right_sidebar,greensalad,page_5
page7, page_7, right_sidebar,greensalad,page_5
page8, page_8, right_sidebar,greensalad,page_7
page9, page_9, right_sidebar,greensalad,page_8
Thanks for the add-on:). Just on time!
But I think adding the pages with no blocks will not be useful! (you still need to go to each page, edit it, add a block, insert content & save) :(
Can the add-on be used to add a "content block" with some text directly to one area in the page?
But I think adding the pages with no blocks will not be useful! (you still need to go to each page, edit it, add a block, insert content & save) :(
Can the add-on be used to add a "content block" with some text directly to one area in the page?
Yes, it is easy to take me.
However, it is each person.
Be paid customizations so.
...
I think.
you can edit pagetype default.
Can not explain it well.
However, it is each person.
Be paid customizations so.
...
I think.
you can edit pagetype default.
Can not explain it well.
OK.
Changed part.
Change this attached file.
Please create a page type, or set before you import the list page.
at
/index.php/dashboard/pages/types/
Changed part.
Change this attached file.
Please create a page type, or set before you import the list page.
at
/index.php/dashboard/pages/types/
if you need 1100 pages someone can figure it out. I have a wordpress thing in marketplace submission that takes wordpress xml export, creates the pages based on page_type, fills in a content block and imports linked files into the filesystem.
It is of course tied to the wordpress xml format so I am not sure exactly how it would transcribe over in your case, but whenever it hits marketplace feel free to do something fun with it. I found it fun to write it.
-Scott
It is of course tied to the wordpress xml format so I am not sure exactly how it would transcribe over in your case, but whenever it hits marketplace feel free to do something fun with it. I found it fun to write it.
-Scott
Thanks Scott for the suggestion but I think this will not help in my case. The pages I have are in html format. they belong to a 5 years old website.
I think Kino's module is nice & can be modified to handle page contents & attributes but I couldn't do that as I'm new to C5 and still trying to find my way on it :(
I think Kino's module is nice & can be modified to handle page contents & attributes but I couldn't do that as I'm new to C5 and still trying to find my way on it :(
I batch added 8000 articles from an old database to c5 using a script like this one:
I put this in a file called import.php and dropped it into the tools folder. So I can execute it going to mysite/tools/import
c5 will load all the required libraries if you do it this way.
Of course, you'll need to modify it to your needs, but in the same way you add the content block, you can add any block you want. You can even use some more complex code to find the first existing content block and replace it. The sky's the limit.
$articles = Page::getByPath('/articles'); $collection_type = CollectionType::getByHandle('article'); $query = "select * from other_database.articles"; $rs = $db->execute($query); if ($rs) { while ($arr = $rs->FetchRow()) { $data = array(); $data['name'] = $arr['title']; $data['cDescription'] = $arr['hometext']; $article = $articles->add($collection_type, $data); $article->setAttribute('keywords',$arr['keywords']); $bt = BlockType::getByHandle('content'); $data = array(); $data['content'] = $arr['bodytext']; echo "Adding: $i - ".$arr['title']."<br/>";
Viewing 15 lines of 24 lines. View entire code block.
I put this in a file called import.php and dropped it into the tools folder. So I can execute it going to mysite/tools/import
c5 will load all the required libraries if you do it this way.
Of course, you'll need to modify it to your needs, but in the same way you add the content block, you can add any block you want. You can even use some more complex code to find the first existing content block and replace it. The sky's the limit.
When I makehttp://www.prizebp.jp (http://www.concrete5.org/about/showcase/entertainment/banprest/... ) "job" was implemented using. 84,000 pages are being processed in batches.
Just use the Page class is best avoided because it is too expensive.
Just use the Page class is best avoided because it is too expensive.
Thanks!
Darren