Jump to content

August

Members
  • Posts

    34
  • Joined

  • Last visited

  • Days Won

    1

August last won the day on March 13

August had the most liked content!

Profile Information

  • Gender
    Male

Recent Profile Visitors

1,525 profile views

August's Achievements

Jr. Member

Jr. Member (3/6)

10

Reputation

  1. Hello @dotnetic, it fits exactly. ? It's what I was looking for, just great, thank you very much for that! I found this post in the morning: How to remove breadcrumbs, modify headline? and would most probably have failed on it .. It feels good while you grow with a project and learn a lot of basic things and have the support of the great processwire- community. And thats motivating too. This is not a given, so thank you all!
  2. Hello, I'm looking for a way to append a title beside the headline of a page which is beeing edit. It's about ease of use, at first glance. To figure out, first I tried something like that: (file "_content-head.php" of AdminThemeUikit (just Testing and remove)); if($headline !== '' && !$adminTheme->isModal) { # Test-Line: get current page-id (edit) $p = $this->pages->get($this->input->get->id); # Test-Line: check (type=text) page_field isn't empty $appendix = !$p->page_field == '' ? "($p->page_field)" : ''; echo "<h1 id='pw-content-title' class='uk-margin-remove-top'>$headline . " ($appendix)</h1>"; Then, I tried a Hook, but it alters the page->title and this doesnt fit my need here. wire()->addHookAfter('Pages::saveReady', function($event) { $page = $event->arguments('page'); if ($page->template != 'my_template') return; $page->of(false); $page->title = "\$page->title|\$headline - " . $page->page_field->title; $event->return = $page; }); I read about: Process::headline(), but can't figure out. Does Someone has an Suggestion, how I can extend/append the existing title (page edit) with tiny Text, just render? Thanks in Advance
  3. An interesting solution, @da². I meant how do you know about git, you seem to be well up to date ? Unfortunately, I've seen the table header disappear on smaller devices. This is certainly not such a problem if there are a few entries, but it is more of a problem with a table like yours. But perhaps the problem with the hidden table header can be solved on devices with lower than medium viewport by showing then the corresponding header for each entry directly above or before each line on smaller devices, possibly like following .. <td><em class='pw-responsive-table-header uk-text-meta '>Score</em>0</td> and so on . That would also be Ryan's decision. Maybe someone else has an idea about this...
  4. Thank you for your tip, @da², I have reactivated my github account and shared my suggestion there. I wonder how you know... Let's hope Ryan takes a moment to do this - until then I'll always have to modify this file, which I don't really want to do..
  5. Hello dear Community, it should just meant to be in, so that the ProFields: table doesn't interfere with proceswire's very nice and tidy admin layout on smaller devices when you use a few more columns of data: I would like to prevent horizontal scrolling and will ask you. Is there a quick solution in pw to add a css class? Following Line (117) in file: AdminThemeUikit.module is meant: 'table' => 'uk-table uk-table-divider uk-table-justify uk-table-small', Maybe extending with uikit-css: uk-table-responsive, so it would works like: 'table' => 'uk-table uk-table-divider uk-table-justify uk-table-small uk-table-responsive', Actually, I don't need any other major changes to the theme that would require the usage of Uikit admin theme customization options, for this/now. Or do I have to use it? Thanks in Advance.
  6. Dear community, I 've built 3 fields from my process page tree, each with a single select field, into a wrapper with its own namespace - Ryan calls it "Fieldset Page". The inheritance works wonderfully, but finally - the selection is never saved in here. Could someone please tell me why I am not able to save inherited fields in this Fieldset Page? Is it a kind of ProField Function what I'm looking for? Did I misunderstand it?
  7. Hi Sierra, that helped once me solve a similar problem .. $this->addHookAfter('InputfieldDatetime::processInput', function(HookEvent $event) { // Get the object the event occurred on, if needed $InputfieldDatetime = $event->object; // An 'after' hook can retrieve and/or modify the return value $return = $event->return; $post = $this->wire('input')->post; // change date string to timestamp $firstdate = strtotime($post->date_start); $lastdate = strtotime($post->date_end); // if first date greater than or equal to last date if ($firstdate > $lastdate && $lastdate != '' ) { $field = $event->object; if ($field->name == 'date_start' || $field->name == 'date_end') { // get the page being edited $page = $this->wire('modules')->ProcessPageEdit->getPage(); // ensure we don't save 'erroneous' dates; we revert to older saved (db) dates or blank $oldDate = $page->get($field->name); $field->value = $oldDate; // only show error on first date field if ($field->name == 'date_start') $field->error(""); if ($field->name == 'date_end') $field->error("") . $field->message("Das Datum zum $field->label muss in der Zukunft liegen, bitte die Angabe zum Veranstaltungsbeginn beachten!"); } } // Populate back return value, if you have modified it $event->return = $return; });
  8. Dear community, I'm trying to display the page title of another field in a selection next to the page title: It only looks alright on this admin-page then saved, until the 1st choice (Page Reference) is changed to show other options in the 2nd field (Connect Page Field): {title} - {connect_page_field_title} : Hierarchy 1st field In addition, Umlauts of user names are not displayed correctly, there are HTML entities too. On the same page I've figured out, that Umlauts are displays correctly with following Setting in Custom format (last Screenshot): *.page selector will show an Umlaut correct here: {title.page} {title_of_parent_child_page.page} Please, please help!
  9. Hello? I'm not sure if it can be done and would be happy to read about from you: Any approach to solving the problem would be really helpful here. I use a template in which save locations as pages, fields here are storing title, address and so on to each location .. Another template (lets call it B), I access the locations as page-reference-field (single select) and I would like to display the specification of a field (a simple string) from the location-template, which has Ryans Fieldtype “text field unique”. Using a hook on "text field unique in template B display the "unique" placeholder - so that these string cannot exist twice in the system. By the way, it works, but only - ion page-save, first . Do you see a way, that the text field with the required string is automatically filled out, if a location (Page Reference) has been selected, just before? I also thought about doing this with another page selection reference field, but I don't see any way to update the required text input placeholder …
  10. Hello, I've been trying to create a selection for a dynamic selection field for days now. This ist the working statement in the Admin-Backend of the field (Page/select - not Multiselect or AM) and I also tried/played around with a hook in ready.php,but the result remains the same: parent=page.helper, refSeries=page.selectManufacturer, pages_subcat=page.selectSubcat However, the current status requires pressing Save to reload the changes. It would be good if this could be done like the other dependency fields. I've also tried some sort of pre-select field to get the desired results from its result. Unfortunately, does anyone have an idea or a tip on how I can solve this, maybe with a Hook in "selectablePages", add(pages->find...)? I appreciate any support that leads me in the right direction, thank you in advance
  11. Hi cpx3, if I understand correct, alternate you could try display the first 3 titles like this: $news = $pages->find("template=template-news,start=1,sort=created")->slice(0, 2); // slice(start, limit) foreach($news as $i){ echo $i->title; } first() would be also an option, getting the needed page -I think...
  12. Thank you @tires, but I'm looking for a solution, that let me directly select the manufactor depending on chosen "hardware_subcategoy". This field has a page field, that hold the info about manufactorrer. I need to divide Articles by manufator, just before select an Arricle from. In this case I figured out, that I can change the Label-Field from Title to a custome one: The result shows stored manufactor to each item, not quit what I'm looking for, but I can see, it's somehow possible reaching the pagefield "manufactor" within a fieldset in my template: Instead I need first a list of available manufactorer, unique, so then I just can select the prefiltered Articles (item) in the 4th select-field, named "hardware_item". The last custom Selector String for this 4th select(pagefield) should be "parent=page.hardware_manfilter". Selector String: Something like this does not work: In a hook Ive tried only the These selector, without the subselcet, but here I have to save the page to see some Changes which otherwise are dynamic. $event->return = $page->hardware_subcategory->children; I hope my Quest is more clear and I ask again: Whats the best way doing it, is it possible? Thanks in Advance.
  13. Hello, I'm getting stuck trying to build a filter between subcategories and some items. For the final Item itself, I setup a reference field and wrote following selector: If there are more entries, filtering by manufacturer (which is part of the item) would be very helpful. The problem I'm stuck: How I can get and select an existing manufacturer field, which exist here: fieldset_device.manufactor I tried a hook, just not happy with the result, I despair on: $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { $page = $event->arguments('page'); if($event->object->hasField == 'hardware_manfilter') { $subcat = $page->hardware_subcategory; $items = $event->pages->find("parent=$subcat"); $event->return = $items->each('fieldset_device.manufactor'); } });I I appreciate any help.
  14. I'm glad to have found a really good answer to my question elsewhere here in the forum, thank you so much, kongondo. I should stop thinking too complicated, learn something more, an Array, a PageArray ,.. ? It's processwire after all .. It only needed a small change: instead of "name" it was set to "hasField", in my case.
  15. Hello, in the following page structure, I would like to only show selected checkboxes as option-select (single). All "TYPE (Index)" pages contains a checkboxes field where you can select what is available for select - when editing a child-page (Item) PARENT |___1st TYPE (Index) template |___Item |___I... |___2nd TYPE (Index) different template |___Item |___I... I missed something, of course. With the following code snippet I get the selected checkboxes set for "1st Type", but unfortunately also under the other TYPE pages: $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->hasField == 'assign_something_default') { $pa = $event->pages->get("id=1354")->children; foreach($event->pages->get("parent=$pa, set_something!=") as $i){ // get TYPE-pages, having (chosen) checkboxes $event->return = $i; } } }); And a try before (screenshot) was'nt the right way here, the result shows pages where checkboxes are set (TYPE) but not the specific content of the checkboxes: "set_something": Type-PageReference, Type-PageArray (e.g. Multi), Input-Type Checkboxes How do I ensure that the correct selection is displayed for the respective child entry?
×
×
  • Create New...