There must be a better way to enter blog posts
Permalink
I have a basic blog setup with a blog page and children posts. Now when I want to add a new post I have to go to the admin menu->sitemap->blog->[right click]Add Page. This works, obviously, but it is a rather clumsy way to add a new post, and certainly unacceptable for a client expecting a link to a basic form.
What I need is a link that is the equivalent of sitemap->blog->[right click]Add Page (i'll worry about skinning it later, which also must be changed for clients)
So I tried to do this, and failed :(
I made a few attempts, the latest of which is
and then mapped this to the url with
Technically this works, but not the way I expected. I get a new page, but it has the page title and a block that says..
which is where I was expecting a content block.
So, before I go down this rabbit hole trying to figure out the problem, I thought I would ask if
1) is there another way to do this I am not seeing? I mean, this seems like such a obvious need and relatively easy for the C5 brainiacs, it's surprising it does not exist... so I assume it does in some fashion I am not aware of.
2) should I be approaching this from a different direction, like maybe a singlepage form that populates the data and creates a new page
3) can I set an attribute or something to automatically open this page in Composer?
So, what is the best way to do this?
Thanks
What I need is a link that is the equivalent of sitemap->blog->[right click]Add Page (i'll worry about skinning it later, which also must be changed for clients)
So I tried to do this, and failed :(
I made a few attempts, the latest of which is
public function addBlogPost() { $blog = Page::getByPath("/blog"); $blogPost = CollectionType::getByHandle('blog_post'); $postData = array(); $postData['cName'] = 'New Post'; $postData['cHandle'] = 'new-post'; $postData['cDescription'] = 'New Post'; $template = PageTemplate::getByHandle("right_sidebar"); $blog->add($blogPost, $postData, $template); $this->redirect('/blog/new-post'); }
and then mapped this to the url with
Route::register( '/newpost', 'Application\Controller\Api::addBlogPost' );
Technically this works, but not the way I expected. I get a new page, but it has the page title and a block that says..
The Content page type composer form element will output its contents here (Block ID 552)
which is where I was expecting a content block.
So, before I go down this rabbit hole trying to figure out the problem, I thought I would ask if
1) is there another way to do this I am not seeing? I mean, this seems like such a obvious need and relatively easy for the C5 brainiacs, it's surprising it does not exist... so I assume it does in some fashion I am not aware of.
2) should I be approaching this from a different direction, like maybe a singlepage form that populates the data and creates a new page
3) can I set an attribute or something to automatically open this page in Composer?
So, what is the best way to do this?
Thanks
I totally overlooked that button. Good to know.
It does reduce the dashboard->sitemap_blog->[left click]->add clicks to blogpage->add->post, so that is certainly better my 1 click. But it still is not acceptable for client use. Not only is the post page ugly as all get-out, but clicking that add button shows a bunch of other addable items, which is very much not desired.
BUT, your suggestion did lead me to an alternative: the link for create new post ishttp://domain.com/ccm/system/page/create/12,... and that url can be added to the ADD POST button on the home page.
Now I just have to work on the UI.
Thanks
It does reduce the dashboard->sitemap_blog->[left click]->add clicks to blogpage->add->post, so that is certainly better my 1 click. But it still is not acceptable for client use. Not only is the post page ugly as all get-out, but clicking that add button shows a bunch of other addable items, which is very much not desired.
BUT, your suggestion did lead me to an alternative: the link for create new post ishttp://domain.com/ccm/system/page/create/12,... and that url can be added to the ADD POST button on the home page.
Now I just have to work on the UI.
Thanks
you could add a custom menu item button (only visible in edit mode) and use your link for it
also possible to add some logic to it in it's controller, like checking permissions
also possible to add some logic to it in it's controller, like checking permissions
Go to Dashboard > Pages & Themes > Page Types and find the Blog Entry page type (or add a new Blog page type if it doesn't already exist).
Click Basic Details for the Blog page type, and set
-- "Launch in Composer?" to "Yes"
-- "Is this page type frequently added?" to "Yes"
-- "Publish Method" to "Always publish below a certain page", and select Blogs (or where ever you want them saved).
Now you can add a new Blog Entry from the Pages slideout panel, which will automatically open in Composer, and automatically be published under the location you specified.
You can customise the blog creation form by selecting "Edit Form" in the Page Types dashboard page.
Click Basic Details for the Blog page type, and set
-- "Launch in Composer?" to "Yes"
-- "Is this page type frequently added?" to "Yes"
-- "Publish Method" to "Always publish below a certain page", and select Blogs (or where ever you want them saved).
Now you can add a new Blog Entry from the Pages slideout panel, which will automatically open in Composer, and automatically be published under the location you specified.
You can customise the blog creation form by selecting "Edit Form" in the Page Types dashboard page.
well, lookie there... that works out fairly well. Thanks. I see I can tweak the templates for the layout elements, but any idea if it is possible to tweak the page layout? I guess this would be the equivalent of applying a different dashboard theme to one page only, which I have never tried to do with a dashboard page, and no idea if you can even have different themes for the dashboard.
Thanks
Thanks
You can have different themes, yes.
I'm unsure if I'm reading correctly, however you might also want to try editing the output of the blog page type.
Dashboard Panel > Pages & Themes > Page Types
Choose "Output" under the blog page type, then "Edit Defaults" and the Page Type will launch. You can place blocks and lay things out as you like here, and then save the page type.
I'm unsure if I'm reading correctly, however you might also want to try editing the output of the blog page type.
Dashboard Panel > Pages & Themes > Page Types
Choose "Output" under the blog page type, then "Edit Defaults" and the Page Type will launch. You can place blocks and lay things out as you like here, and then save the page type.
I saw that as well, but I was under the impression that can only change the 'output' UI, not the UI of the composer. Am I mistaken?
Basically, the idea is, the blog input page needs to look as much as possible like the rest of the live site. It's not super-critical, but it was a request from the client.
Basically, the idea is, the blog input page needs to look as much as possible like the rest of the live site. It's not super-critical, but it was a request from the client.
You are correct that there is no in-built way to style the Composer interface.
Ah - I see. No if you use Composer you have to use the stock backend interface.
You could always just *not* use Composer... They'd have to backtrack and name the page before publishing, but that might be the ticket you're looking for.
You could always just *not* use Composer... They'd have to backtrack and name the page before publishing, but that might be the ticket you're looking for.
you mean something like, build my own blog entry page, allocate the resources, then update upon submit? I was thinking about that... but it seems easier to just reskin the UI with postload javascript.
and automatically let it reside under a certain page ? or choose where it should be placed after creating the content....