Jump to content

Ralf

Members
  • Posts

    144
  • Joined

  • Last visited

Everything posted by Ralf

  1. I found the mistake/ problem ... it were the curly braces // it doesn´t work $content .= "\$child->select_task->title: $child->select_task->title<br>"; // is working $content .= "\$child->select_task->title (with {}): {$child->select_task->title}<br>";
  2. Hi diogo, thanks for your fast answer. Sorry but "select_task" has in the settings -> Single page (Page) or boolean false when none selected?! And if i put your code behind the "print_r" foreach($child->select_task as $task){ $content .= $task->title; } i get this "Notice: Trying to get property of non-object..."
  3. Hello everybody, i try me just on a new project an "assignment list" for my association. I built years ago a first version with php and mysql but now i want to switch to Processwire My backend I have designed as follows: Home |- events (template events) | |- event | |- event (template event -> title, date, jobs (PageTable) | |- tasks |- groups |- places The PageTable "jobs" has the template "job" (title, select_task, job_begin, job_end, select_place, staff_needed, select_group & participants). And now I have tried using the following code to output the test data: $events = $pages->find('template=event, sort=date'); foreach($events as $event){ $content .= strftime('%d.%m.%Y', $event->getUnformatted('date')) ." $event->title<br />"; if($event->hasChildren > 0) { foreach($event->children as $child){ $content .= "<li>\$child->url: <a href='{$child->url}'>$child->url</a> // \$child->id: $child->id // \$child->select_task: $child->select_task // \$child->select_task->title: $child->select_task->title // \$child->select_place: $child->select_place //<br> \$child->staff_needed: $child->staff_needed // \$child->participants->count: $child->participants->count // \$child->job_begin: $child->job_begin // \$child->job_end: $child->job_end // </li><br><br>"; echo '<pre>'; print_r($child); echo '</pre>'; } } } the output you can see here: http://entwicklung.hungerberghexen.de/events/ My problem now is that with my code above i get not all values from the fields (it almost looks as if I would not be deep enough in the array?) e.g. "job_begin" & "job_end" -> work -- but for "select_task" i get only the ID ?! In advance thank you very much for any helpful hints cu Ralf
  4. Hi Martijn, thank you very much! It works perfektly again Have a nice Weekend cu Ralf
  5. Hello @all, its just a few days gone since Martijn write this beautiful code and PW is now in Version 2.6.1. available. This is the reason why i answer to this Thread, yesterday i updated my Installation with this code from Version 2.4.0 to 2.6.1 and at the first look around it seems all good. But when i open now a horse page in the backend i get the following Error: Recoverable Fatal Error: Argument 1 passed to InputfieldWrapper::append() must be an instance of Inputfield, boolean given, called in /www/htdocs/xxxxx/site/modules/HorseFamilyEdit.module on line 151 and defined (line 192 of /www/htdocs/xxxxx/wire/core/InputfieldWrapper.php) This error message was shown because you are logged in as a Superuser. Error has been logged. Administrator has been notified. This are the lines from "HorseFamilyEdit.module" // Markup $markup = $this->modules->get('InputfieldMarkup'); $markup->label = $this->_("Kinder"); $markup->value = $table->render(); $wrapper->append($markup); $view = $form->find("id=ProcessPageEditView")->first(); $form->remove($view); $form->append($wrapper)->append($view); } } And the the InputFieldWrapper Code are the same in Version 2.4.0 and 2.6.1, the only difference are the line in the file. My Question is now, could somebody help me? Thanks in advance Ralf
  6. @ Martijn fabulous - you made my day !! change the z-index from 2 to 10 makes the difference...
  7. @Manfred62 thanks for the confirmation. This misconduct is known to me. Unfortunately I have discovered this problem not until shortly before publication. But my first try, it failed to repair. Now I've decided to completely change the slider, but this will take some time ... I have tested Slider2 and thought I'll try it?
  8. @videokid great that was the expected response @martijn It was the least I could do
  9. Hello community, i´m proud to tell you that my first website with processwire is online Even though I have not necessarily chosen the easiest project for me ... it was/is a great joy to work with processwire and I´m very glad to have discovered this great system and this very helpful community, thanks that I could be a part of it! Now to the page: It is a Trakehner horse breeding farm in southern Germany. www.trakehnerhof-st-vitus.de The basic system is based on the site template by Martijn (here again many THANKS Martijn). It is supplemented by a responsive Design with bootstrap, meanmenu, nivo-slider, magnific-popup and some css stuff. To import more than 500 individual horse sites, the CSV import module helped me a lot. By some Excel magic in the run-up and then a clean csv file the import to processwire was very easy! Installed Modules: - Image cropping tool - Get Video Thumbnails - ProcessImageMinimize - Piwik Analytics - MinifyHTML just to name a few ... So what do you say? Would you buy a horse
  10. shame over me it was tooo late last night... you are right, my date field haven´t an output format set because I didn´t need it until now.
  11. Hi, there are in the meantime a lots of Q&As about the Admin Page List but actually I missed one. Is it possible to output a "Date"-Field ?? Because only with the name of the Field I get back a Timestamp... Thanks
  12. I know from other projects ... but current it was a requirement.
  13. Sorry renobird for straddling between... But for beginner like me I have found a table with all commands that are included in the full toolbar and I thought that might be interesting for others?! See here the full range of possibilities -> CKEditor Buttons at the Full Toolbar And here is a PDF File with the Complete List of Toolbar Items for CKEditor So with this List you can now easily customize the Buttons from CKEditor in PW (Setup -> Fields -> your Field with a CKEditor (for example "body") -> Input) and under CKEditor Toolbar you can post your individual sequence. This is for example my sequence: Format, Bold, Italic, Underline, -, RemoveFormat TextColor NumberedList, BulletedList, Blockquote, -, Outdent, Indent, -, JustifyLeft, JustifyCenter, JustifyRight PWLink, Unlink, Anchor PWImage, Table, HorizontalRule, SpecialChar PasteText, PasteFromWord Undo, Redo Scayt, -, Sourcedialog much fun with it
  14. Hi, if it still does not work for someone after all these solutions would be another solution - which worked for me - utf8_encode(strftime('%d. %B %Y', $page->getUnformatted('date'))); (for the archiv and THANKS ryan for the hint with strftime reference at php.net.)
  15. Awesome! What Martijn here shares with us that's just about the limit. We/ I can learn so much from the Code inside. I asked Martijn if he can help me with my pedigree problem to output the familytree and he gave me back a complete basic Homepage structur and THREE new modules!!! THANK YOU PS I hope you share this modules also in the "Modules-Section" because they are really helpful and others can be inspired for own modules - I for one am it.
  16. WOW Great! I will download asap some VM´s... Thank you Raymond for sharing with us!!
  17. Hi Adrian, I install your module and I found it really helpful !! THANKS for this cool module. But I have one Question.... EDIT: it works all like a charme
  18. It would be very helpfully if you could do that!
  19. Hi Martijn, thanks a lot for your answer!! Just a few Questions - sorry i´m a beginner You are right, but this line: echo "Sorry, at the moment we don't have the horse that you're lookin for." needs only a ";" at the end... But my bigger Question is ... understand i that correctly, that with this php-Code i can build a navigation?? I have at the moment a little problem, to understand the whole context. I hope the knot in my head dissolves soon... A second Question: how should a template and/or a php file of 'horse' now look like?? Are this fields for the template correct? For the Navigation - a checkbox, named: horse_owned, (see Martijns last post) - a checkbox, named: for_sale, (see Martijns last post) For the sex - an Inputfield type Page, see structure above name the field 'types' (IS this Field for the Select "- a Page field, [stallions, Broodmare, Colt, etc..]" ) For the pedigree - a Page field -> horse_father (with AutoComplete and new Sites/Horses will be created as subpages from Home->Horses) - a Page field -> horse_mother (with AutoComplete and new Sites/Horses will be created as subpages from Home->Horses) - a Checkbox -> horse_enable (for enable or disable a link to this horse) All the rest of information - and each a Text/Textarea Field for description, owner, price, birthday, etc. Did i miss something?? Big Thanks for your great help!! Ralf @ Martijn When this Homepage is online i think a big thanks to the community i can gave back is, that i want write a tutorial for this special requirement with all your helpful answers and suggestions!!
  20. Hi @all After I adopted Martijn suggestion, i have a new Question about the Navigation. The actual situation is now, that the Front-End Navigation from the new site should look like that: Home | +-- Our Horses | | | +-- Stallions | | | +-- Broodmare | | | +-- Colt | +-- Horses for sale | +-- Riding Horses | +-- Broodmare | +-- Foals and young horses And that all combined with a breadcrumb :/ How would you solve that? With the tip from URLSegments i thought, one option could be "checkboxes" for all 6 Options/Sites from above and the "User/Editor" can select one OR more Sites on which the actual horse will be presented on the Homepage. But how do I use it for building my navigation let alone a breadcrumb? Questions about questions... Did somebody have any answers
  21. @ Martijn I´not sure but i think I understood Home | +-- Horses ( enable urlSegments ) | +-- Name of the horse (Template "horse") +-- Other horse (Template "horse") +-- And another horse (Template "horse") +-- etc. And this are the Fields in the Template "horse"? - a Page field, [stallions, Broodmare, Colt, etc..] - a Page field -> horse_father - a Page field -> horse_mother - a Checkbox -> enable or disable a link to this horse - and each a Text/Textarea Field for description, owner, price, birthday, etc. But the first Question it run through my head with this solution is that at the end of the day I have one categorie "horses" with I don´t know 500+ Pages. How can the prospective editor quarrels this mass and taking care not to lose the overview? In my first thoughts I handle this with 4 Categories (Stallion/Broodmare/Colt and a hidden "selects_for_pedigree"). Now I understood the Power from your solution and ask me is there a way to handle it with 2 Categories ? - One for the OWN_horses (Categorie "Horses" from above - with all horses that have a fullfilled Page OR Checkbox = enabled) and - One for the selectable_for_pedigree horses (with also the template=horse but the checkbox = disabled and nothing else in it as the title) The benefit should be a small (~100), manageable number of pages in Categorie 1 (where the editors are weekly) and 400-500+ Pages in the other categorie which is only used for the pedigree. Some additional Questions: a) Is there a possibility that in the backend search (for the fields "Mother" and "Father") to carry out not only one category but over two or more categories? Could I do that with for example the Template? b) When later a new horse born, the mother-tree is clear I have it on the site but how is the "right way" to capture the Pedigree Data for the father-tree (when the horses not yet in PW)?? 1) New Page - paternal grandfather (with the name of his parents) 2) New Page - paternal grandmother (with the name of her parents) 3) New Page - Father (with the autocompletion function for his parents because Step 1 and 2) 4) New Page - new born horse .... => Result 4 Steps for 1 new horse OR is there a way in PWs Backend that this 4 Steps can be done in 1?? Again big thanks to Martijn and kongondo!!!
  22. @ kongondo you are tooo fast for me... i prepared a answer but without reading your last two comments (awesome) but I'll make up for it immediately Here is my answer to the other comments... Sorry sorry sorry guys, I don´t get it Yes and No ... In my scenario I don´t have for all Parents in the tree own pages!! Why? equal to more I think this is the problem why i don´t understood your answer, it is not the intention that ALL HORSES are CLICKABLE!!! only that horses that have a own page at the homepage (and thats less than 10% over the complete homepage from the horses in the pedigrees). Would it be helpfull if you could see the acutal homepage? I think so... Here is for example one page of a Colt http://www.trakehnerhof-st-vitus.de/home/fohlen/lessing-v.-lossow-u.d.-prst-linn-v.-eh-friedensfürst As you can see the pedigree is only a part of the page for a horse (here: "Lessing"). But in the pedigree i have parents with a own page ("Lossow" and "PrSt Linn") but not for the other because they don´t have a own page and so i don´t want a clickable link/name. And all that information for a horse page (Name, Birthday, Owner, Price, Description, some Pictures AND the pedigree) the user should fill in one template, that's the thought behind it. OK that was the plan but now i read the new comments from kongondo...
  23. @ kongondo thanks for your link - I have read the article twice already, but not sure if i found the right "Categorie"... I think its 1. Single Category Categories = Departments = Stallion/ Broodmare/ Colt Items of interest = Employees = the horse ...I will read it again > Btw, how deep will the ancestry go? The Example in my first Post is the "final" deep!! I´m not sure if this is an international standard but in Europe it is so. We have thus all in all 4 Generations. @ Martijn thanks for your reply but it could be that i´m not clarify enough in my first post or I have completely misunderstood your contribution. ALL horse names are clear and they/we knew the parents. I thought I could solve this so: I have 14x Fields with "Page autocomplete" for the pedigree in my template in the backend (ok a little bit more Fields for example for a Description, the name of the horse, some pictures, ....). Every Field uses the Page autocomplete so that the fill in process needs only a few seconds per horse. BUT the problem now - for me - is that when a horse from the pedigree already has its own page on the website I do not want only the name of the horse in the current pedigree, I also want a link to the appropriate page (the mother, father,. ...). This is my proper Question, how can i solve this issue? Should i use 28x Fields in the template - for each horse a Page autocomplete Field only for a "text" Name and one Field for a Name with a Link to another Side??? Or did you have a completely different method? Thanks Ralf
  24. Hi today I have sure a simple question for the expert audience. My actual Project with PW is build up a Homepage for a horse breeding farm and the point I come across are the pedigrees from the horses (more than 100...). For example it looks like that: Father - paternal grandfather - great-grandfather - great-grandmother - paternal grandmother - great-grandfather - great-grandmother Mother - maternal grandfather - great-grandfather - great-grandmother - maternal grandmother - great-grandfather - great-grandmother The question which goes through my head since a couple of days, how I make the pedigree - from each horse - as easy to complete as possible? I thought of "Page Fields" for each horse (Title and title_value) which is filled via an autocomplete when writing. And at the first time a data import with csv, i hope that would be easy ... BUT how do I implement it now, that when i have the parents, grandparents or great-parents in my breeding stock - and they have a own Page (with also a pedigree, the name, some pictures, a description, ...) that on my database there is a LINK to this Page and not only a Name?? How would you solve that? a) With two query fields for the user number one he should use when he want to link to another side and number two when he want only type in the name? b) for each horse the same "full page" and in the query, only one field is to link ready or not (depending on whether the page has been filled or not?) c) something else? Oh one thing more, the main categories under Home are (if this is relevant): -Home -- Stallions ---- Stallion 1 ---- Stallion 2 ... -- Broodmare ---- Broodmare 1 ---- Broodmare 2 ... -- Colt ---- Colt 1 ---- Colt 2 ---- Colt 3 ... I am grateful for any idea cu Ralf
×
×
  • Create New...