5 replies to this topic
#2
Posted 07 May 2012 - 07:11 AM
Hi, and welcome to the forum!
What you are asking is not that simple because this is not the way that ProcessWire is designed to work. It's not impossible though, and if you have the skills to create a module you can do it. I can't help you a lot with this, but maybe someone who can will jump in the discussion.
What I can do is help you to get started. Here it goes
To make a page appear in the admin navigation, you just have to make sure that it is children of the admin page in the tree. You can do this with any page with any template.
If you want this page to behave and look like the other admin pages, you will have to give it the admin template... go ahead an try it... when you do this, the page will simply say "This page has no Process assigned". This means, you will have to create a process module that does what you want and assign it to the page you created.
If you edit the page and choose from the several processes that already exists, you can see how it works.
The process modules are on the wire/modules/Process folder of your PW install, have a look at some of them to get a feel of how it works.
What you are asking is not that simple because this is not the way that ProcessWire is designed to work. It's not impossible though, and if you have the skills to create a module you can do it. I can't help you a lot with this, but maybe someone who can will jump in the discussion.
What I can do is help you to get started. Here it goes
To make a page appear in the admin navigation, you just have to make sure that it is children of the admin page in the tree. You can do this with any page with any template.
If you want this page to behave and look like the other admin pages, you will have to give it the admin template... go ahead an try it... when you do this, the page will simply say "This page has no Process assigned". This means, you will have to create a process module that does what you want and assign it to the page you created.
If you edit the page and choose from the several processes that already exists, you can see how it works.
The process modules are on the wire/modules/Process folder of your PW install, have a look at some of them to get a feel of how it works.
#3
Posted 07 May 2012 - 07:31 AM
Hey rob.
What diogo said. You can create a admin page using the "admin" template. It would be placed under the locked "admin" page tree.
The admin template has a field "Process". After creating the page you'll see it under tab "content".
Now you have to create a process module to serve functionality for the newly created admin page.
Once installed it can be selected from the field "Process".
I did a quick example that shows such a module, and even how to use the ProcessPageList module of processwire to create a tree. The id set will be the parent page (your Architects) for example.
ProcessPageListCustom.module
create the module under /site/modules/ and install it.
You can, of course, use any code to generate a list of pages.
What diogo said. You can create a admin page using the "admin" template. It would be placed under the locked "admin" page tree.
The admin template has a field "Process". After creating the page you'll see it under tab "content".
Now you have to create a process module to serve functionality for the newly created admin page.
Once installed it can be selected from the field "Process".
I did a quick example that shows such a module, and even how to use the ProcessPageList module of processwire to create a tree. The id set will be the parent page (your Architects) for example.
ProcessPageListCustom.module
create the module under /site/modules/ and install it.
<?php
class ProcessPageListCustom extends Process{
public static function getModuleInfo() {
return array(
'title' => 'Custom Page List',
'summary' => 'List pages in a hierarchal tree structure',
'version' => 100,
'permission' => 'page-edit'
);
}
public function execute(){
$pl = $this->modules->get("ProcessPageList");
$pl->set('id',1001); // or any other parent page
return $pl->execute();
}
}You can, of course, use any code to generate a list of pages.
@somartist | modules created | support me, flattr my work flattr.com
#4
Posted 07 May 2012 - 12:34 PM
While testing this module with the ProcessPageList rendering a part of the page tree, I recognized a strange behaviour.
When I enter the get "open=" (processwire/test/?open=1008) to the url it adds another set of childs (duplicate) but opens the page correctly (the one in the get / which are now doubled too).
When I enter the get "open=" (processwire/test/?open=1008) to the url it adds another set of childs (duplicate) but opens the page correctly (the one in the get / which are now doubled too).
@somartist | modules created | support me, flattr my work flattr.com
#6
Posted 22 May 2012 - 10:44 AM
When I enter the get "open=" (processwire/test/?open=1008) to the url it adds another set of childs (duplicate) but opens the page correctly (the one in the get / which are now doubled too).
I think this issue here is that 'open' and 'id' aren't meant to be used together. It's meant to be one or the other. When they are both used, you'll get duplication. Maybe there is a use for them to work together, and it could probably be done, but it's not come up as a need yet. Though if someone else has a use for it, I'll be happy to take a closer look to see what might be possible in the future.
Also tagged with one or more of these keywords: solved, admin, page, navigation
Community Support →
Getting Started →
Customizing the admin panel with the output of published pagesStarted by Vineet Sawant, 17 Jun 2013 |
|
|
||
Community Support →
Themes and Profiles →
Proof of Concept: ProcessWire Admin Theme SwitcherStarted by kongondo, 03 Jun 2013 |
|
|
||
Community Support →
FAQs →
Handling placeholder pages properlyStarted by RJay, 01 Jun 2013 |
|
|
||
Community Support →
General Support →
Page as "Home" navigation setup?Started by photoman355, 30 May 2013 |
|
|
||
Community Support →
Modules/Plugins →
Module/Plugin Development →
Add pixlr editStarted by Galaxy, 14 May 2013 |
|
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












