• Content count

  • Joined

  • Last visited

Community Reputation

72 Excellent

About theo

  • Rank
    Sr. Member

Recent Profile Visitors

742 profile views
  1. I know this sounds a little weird, but I'll show you what I mean. I have now integrated Boostrap 4.0.0 in the backend with PageTableExtended. This works rather well. Here you see Boostrap 4 cards in the PW backend: To make some changes here, the editor can click on the edit icon and the pagetable / repeater opens. (The editor can define to some degree the width of each card here. ;-) ) This is all working well. Since I can edit the fields in the frontend directly (This is the frontend!)... ..I wonder if this would also be possible for the PageTableExtended in the backend. Just clicking on the CKEditor to change some content quickly, without opening the pagetable modal window? Has anyone already considered such a thing?
  2. Now I've got it. I feel like an idiot. I was thinking in terms of separate instances and separate pages, but forgot that all the input fields are in the same DOM tree. So they need distinct names . Actually it is all there with $attrs = $this->getAttributes(); $idstring=$attrs['id']; I just didn't know.
  3. Humm, it does not work in a repeater. It saves the same value for all items. What am I missing? Thank you. <?php /** * ProcessWire Custom InputfieldBSCol */ class InputfieldBSCol extends InputfieldTextarea { protected $cols = array("col" => "", "col-sm" => "sm", "col-md" => "md", "col-lg" => "lg", "col-xl" => "xl"); protected $sizes = array("", "auto", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"); public static function getModuleInfo() { return array( 'title' => 'InputfieldBootstrapCol', 'version' => 100, 'summary' => 'Stores Bootstrap 4 Columns Settings', 'permanent' => false, 'autoload' => false, 'singular' => false ); } public function init() { parent::init(); } public function ___render() { $values = json_decode($this->value, true); $brpval = $values['brp']; $bsizval = $values['bsiz']; $out = ''; $out .= '<select id="brp" name="brp">'; foreach ($this->cols as $key => $value) { $out .= "<option" . ($brpval == $value ? ' selected' : '') . " value=\"$value\">$key</option>"; } $out .= '</select>-'; $out .= '<select id="bsiz" name="bsiz">'; foreach ($this->sizes as $value) { $out .= "<option" . ($bsizval == $value ? ' selected' : '') . " value=\"$value\">$value</option>"; } $out .= '</select>'; return $out; } public function ___processInput(WireInputData $input) { $bs_col_options = array(); $bs_col_options['brp'] = $input['brp']; $bs_col_options['bsiz'] = $input['bsiz']; $colstr = 'col'; if ($input['brp'] != '') { $colstr .= '-' . $input['brp']; if ($input['bsiz'] != '') $colstr .= '-' . $input['bsiz']; } $bs_col_options['bcolstr'] = $colstr; $data = json_encode($bs_col_options); if ($this->value != $data) { parent::trackChange('value'); $this->value = $data; } return $this; } }
  4. Thanks for this idea and example. This makes it super easy and economical to create multi-edit field types for settings which belong together.
  5. Thank you adrian and Robin S. Changing the tree hierarchy is probably not the best idea, and it doesn't have to be for my case. A different idea is, to do it somehow like the pager. Instead of numbers, there could be letters of the alphabet or other categories. This would be less problematic imho. What do you think?
  6. Thank you adrian. This looks close and interesting, but I don't think it is very practical in my case. From what I understand reading the description, I would have to make two separate templates for every letter in the alphabet and the virtual parents would have to be real pages anyway. Am I right? Thank you.
  7. Next question. Not sure if I should open a new thread for this. Can I show some "virtual hierarchy" in the backend? For example my real page hierarchy looks like P -Aa -Ab .. -Zz Can I show something like P -A --Aa --Ab .. -Z --Zz You see the letters of the alphabet, you can "open" them, as if they were pages, but in fact they aren't real pages. It is just for grouping things better. I could add real pages for each letter of the alphabet, but I'm not sure if this makes sense. It deepens the (real) structure with no obvious benefit, other than grouping. I hope you understand what I mean. I'm completely open to any kind of thoughts regarding this matter. Thank you. EDIT: Or sth. similar to paging. Instead of 1 2 3 there would be A B C or some other criteria?
  8. Hehe, thank you adrian.
  9. Thanks Kixe. This works. I have never used ready.php before. Is there a way to use simple HTML in the headline? Like italic, bold etc. From a quick test, I see that it outputs tags as... tags.
  10. Thank you. Can I have the same for the page title / heading? I'm sorry for asking stupid questions. Many things are obvious, some things are not.
  11. Perfect! Didn't see that option... Thank you!
  12. Hello Can I define what the title shows in page lister? Is it possible to combine the title with other field values or plain text? E.g Fields are Title: MyProduct Color: Red Can Page Lister show "MyProduct (Red)" ? Or Title: 22 Can Page Lister show "22 inch" ? Thank you.
  13. Works a treat. Just the fact, that the two tables in the database are redundant, is a bit sub optimal. I guess it is because of how the page field works? But I can live with that. Thank you.
  14. Thanks Macrura.. I was looking in the "field types" section of module categories, but it is listed under "admin helpers". Great, i'll give it a try.
  15. Hello This conversation is some years old. Is there any update to this? As an example in the skyscraper demo, I would not only like to select an architect on the building page ...but also a building on the architect page. These should be in sync or ideally use the same data source. Does such a solution exist now? Thank you.