Jump to content

Melvin Suter

Members
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Melvin Suter

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi there I have a general question: I've got some sites running for my personal use (portfolio/projects, recordings of me playing an instrument, etc.) and I'm currently in the process of recreating them. (They are old and don't look that good.) Generally I use about the same style for all my websites. Should I still create a separate installation for each site or would you create one big installation for all sites and create pages for each "topic"? Option 1: - A ProcessWire Installation on example.com - Pages on example.com/projects and example.com/music - example2.com and example3.com are aliases for example.com and with a module (tried it, should be possible) or htaccess-rewrite redirect example2.com to example.com/projects and so on Pro/Con: + Changes in my core-setup and modules will be active on all sites + Styles and style-fixes are kept clean and equal on all sites - Organisation can be chaotic with that amount of pages/templates/fields - Page might become slow with that amount of elements? Option 2: - example2.com and example3.com have each their own ProcessWire Installation seperated from each other Pro/Con: The upper in reverse What would you do? Any tipps? Thanks & Regards, Melvin
  2. So, I've got it to work. @adrian: that only works with setup, pages, access and modules, not with custom ones. The best way to do this looks like this. (As getModuleInfo pages doens't work.) DkCore.module public function ___install(){ // Create Parent Page $newPageGroup = new Page; $newPageGroup->parent = $this->pages->get(2); $newPageGroup->template = 'admin'; $newPageGroup->title = 'DK'; $newPageGroup->name = 'dk'; $newPageGroup->process = 'ProcessList'; $newPageGroup->save(); } And child modules (for example DkTemplate.module) public function ___install() { // Create Template Page $newPage = new Page; $newPage->parent = $this->pages->get($this->config->urls->admin.'dk/'); $newPage->template = 'admin'; $newPage->title = 'Templates'; $newPage->name = 'templates'; $newPage->process = 'DkTemplate'; $newPage->save(); }
  3. I think I might have found something, I used /dk/ instead of: $this->config->urls->admin.'dk/' I'm going to try this late. As a workaround: create the parent page on ___install() and the rest in the init() of the core (if not existing)
  4. Sometimes it is an obvious solution, but yes I've done it several times. And also: I tried to create the /dk/ page in ___install and the others via the page entry inside getModuleInfo. Only creates /dk/.
  5. Correction: the first Version does only create /dk/ !
  6. I tried clearing cache, etc. and I really don't think it has something to do with it. To clarify things, here some more infos and the 2 approaches: DkCore has this inside the getModuleInfo array: 'installs' => array("DkTemplate", "InputfieldDKEditor",'DkConfig','DkForms'), And all other Modules have this: 'requires' => ['DkCore','DkConfig'], First I tried it with pages inside the getModuleInfo like this (for every Module): 'page' => [ 'name' => 'dk-template', 'title' => 'DK Template', ], This does work, but generate a menu entry for each module. 1. Version: Then I tried this inside the DkCore: 'page' => [ 'name' => 'dk', 'title' => 'DK', ], and this in the child Modules: 'page' => [ 'name' => 'dk-template', 'title' => 'DK Template', 'parent' => '/dk/, ], This doesn't create any pages (or depending if I fidel around maybe creates a normal menu entry) 2. Version: Then I tried to delete the page entry fromt he getModuleInfo and add this to the DkCore Class: // Create Parent Page $newPageGroup = new Page; $newPageGroup->parent = $this->pages->get(2); $newPageGroup->template = 'admin'; $newPageGroup->title = 'DK'; $newPageGroup->name = 'dk'; $newPageGroup->process = 'ProcessList'; $newPageGroup->save(); // Create Template Page $newPage = new Page; $newPage->parent = $newPageGroup; $newPage->template = 'admin'; $newPage->title = 'Templates'; $newPage->name = 'templates'; $newPage->process = 'DkTemplate'; $newPage->save(); // Create Forms Page $newPage = new Page; $newPage->parent = $newPageGroup; $newPage->template = 'admin'; $newPage->title = 'Forms'; $newPage->name = 'forms'; $newPage->process = 'DkForms'; $newPage->save(); // Create Config Page $newPage = new Page; $newPage->parent = $newPageGroup; $newPage->template = 'admin'; $newPage->title = 'Config'; $newPage->name = 'config'; $newPage->process = 'DkConfig'; $newPage->save(); This does create the pages, but only the first one has a process set, the other ones don't. I tried to put the corresponding pages (tempalte etc.) inside the modules and let the DkCore just create the /dk/ page, but still, it doesn't work. I don't know if I'm doing something I shouldn't or if I do it the wrong way, but I really would love to find out. 😄 Thanks & Regards, Melvin
  7. Hi there I've got a problem: I want to create a group in the admin-menu for my modules pages. There are 3 Modules (DkConfig, DkTempalte and DkForms) which all have their own page. I've got a Core Module (DkCore) that has an install dependency to the other modules. I've tried to create the pages on my own inside the ___install() function and I've tried to do it over the pages key inside the module info. I just can't get it to work. Any tipps or ideas? Thanks & Regards, Melvin
  8. Wow. First of: thanks to EVERYONE. That's a greate community!!! Secondly: I'll have to look into your answer. I didn't knew you could create repeater fields. Something learned here. :) Thank you all for those fast and informative answers!
  9. Hi there I've been wondering, how to do this the right way... How do you store data? For example: I've created a recipe-book for myself. Every recipe is a page. Inside those recipes I've got a textarea with instructions and I need to have a list/table with ingreadiants and amount. Right now I'm using a yaml-field, as it is the easiest way. But is there a better/correcter way to store data like that? Or as a better example, if you have a page and want comments to that page? Basically it's just the setup where yo have items/pages with multiple sub-entries with multiple values. Do I write a module/template which access the database directly over the $database API and create my own table? Or do I create sub-pages to that page for each entry? Or do I use yaml-fields? I get that normaly a page would be the primary data-entries. But with time that would make the tree quiet bloated, wouldn't it? Thanks and Regards
  10. Something cool I just noticed: I can create a folder in my /opt/ with all my personal modules I use on every site and just symlink that folder into the "cores" module folder. BAM. I've got all my modules everywhere ready to install 😄 I just love processwire
  11. I tried with just the wire folder. That works! If I could symlink the other file too that would be awesome, but not neccessary. Btw: I host my own server so, If there's any settings needed, that wouldn't be any problem. 😄
  12. Thanks for your answers! @wbmnfkt I tried switching those two settings, didn't change anything. I'll look into mod_rewrite.conf if I can find anything in there (But I guess it's not a rewrite error) @bernhard here's what I've tried: Linked .htaccess, index.php, install.php and wire with 'ln -s' to the document-root Copied site-blank to the document-root Opened the domain in a browser (install script starts) Run through install script and at the last step (setting up admin-user and backend-url) after click on "continue" I get an error: 404 page not found (no site configuration or install.php available) (this is in a processwire-style, screenshot attached) to try getting thins running I unlinked index.php and copied it to the document-root (Now I was able to save those settings) after that (with index as a file or a link, doesn't matter) I can access front & backend, but everytime I save something I get this error in plain-text: 404 page not found (no site configuration or install.php available)
  13. Hi there I've used processwire on 3-4 pages now and I just love it! There's one thing I'm currently trying out but don't get to work: Professionally I manage web-servers for a web-agency which uses Typo3. (I don't get along with Typo3), but there's one thing I really like. In Typo3 you can place the current "core" (current version) in a shared place and link the folder & index file to the website you want. I really like this setup, as you can update multiple sites at once. My Problem: I always get a "config or install file missing" error. (Guess it has to be with __DIR__ not beeing at the right place.) I attached 2 screenshots which show, how I thought the setup could look like. Has anyone tried something like that? What can I do to get it to work? Is it even possible with processwire? Thanks & Regards, Melvin
×
×
  • Create New...