Jump to content

Custom admin interface for adding articles


tuke
 Share

Recommended Posts

I'm trying to create a custom isolated admin interface for adding articles to the site. The new interface should contain only a few input fields (title, content, time and place) and a publish button.

When user press the button:

- a new child page is generated under 'articles' category.

- page name and url is taken from the title-field

- all content from input fields are added to the page

Basically this will automate page creation so adding a new article is easier and faster. Is there any easy way to implement this?

Link to comment
Share on other sites

Definitely possible, and there are some past posts that cover similar territory (though can be admittedly hard to find). My office is just about to close up, so have to reply quickly, but here's a few places to start:

  • Have a look at the API cheatsheet and the $pages var.
  • If you want something ready-to-go, Form Builder can do this without you having to code anything.
  • You might also look at the FormTemplateProcessor module at modules.processwire.com.
Link to comment
Share on other sites

I´m interested in this subject as well.

What´s the best way to create a custom admin page? I my case I want to include an administration for an seperate mysql-table (which has nothing to do with PW itself). I would like to have an additional link in the backend navigation which sends the editor to a page where he can insert / edit the entries. (I would just include simple forms and sql-queries to realise the functionality of inserting/editing)

Another idea related to this topic:

Is it possible to "outsource" one part of the PAGE-tree in the backend to a seperate page called ARTICLES or what ever? I would like to administrate my news- or staff-section for example in an own backend page because of the overview when the whole page gets larger and more complex in its number of pages.

Link to comment
Share on other sites

Greetings,

I've been following the various posts on this subject. Definitely, handling page-creation from either front-end forms or a well-controlled admin page is important.

At the current time, I see advantages to using the admin interface for page creation/editing, but limiting users with various roles to only seeing certain parts of the form. It works well, and guarantees that what is submitted uses the correct template and places the submission into the right place page tree.

I've been doing this by just using the URL of the specific admin page. For example, log into the back-end of your site, then go to the admin page and pretend you are creating a "new" page in your site tree. Copy that URL and use in in any front-facing file. Just remember to set the permissions for the fields and forms.

Thanks,

Matthew

Link to comment
Share on other sites

create:

new $user (example name: article_creater)

new $role (for example creating_articles)

give the user this role

new template -> set permission to the new role and delete the others

new page with the new template, set to hidden to exclude it from navs and search.

create the template file for the template and look at this topic for login:

http://processwire.com/talk/topic/107-custom-login/

set the url after login to the same page

look at this thread to generate content from frontend

http://processwire.com/talk/topic/2174-writing-from-front-end-to-back-end/page__hl__login#entry20453

hope could help you

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...