Jump to content

renobird

PW-Moderators
  • Posts

    1,699
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by renobird

  1. I've been running an early version of this module for a while, and just haven't kept up with development — but WOW! Nice work all, this is really great! Just wanted to mention that there are still issues with the module if used on the user profile page. Running the latest PW dev and the latest version of Thumbnails.
  2. Arjen, Missed your post above until now. I don't have time at the moment, but overall I'm not doing anything all that fancy.
  3. Soma, Nice call on the "new NullPage"
  4. @arjen I had hoped it was that easy too — perhaps for a single checkbox field. No luck for this. @Soma Bingo! $field->attr("value", $field->getSelectablePages($page)); Thank you good sir! That was it.
  5. hello all, In a process module I have a form, and I can't figure out how to set all the options to "checked" for a checkboxes field. See the "semester" and "year" sections of the code below. // Form $form = $this->modules->get("InputfieldForm"); $form->id = 'filters'; $form->method = 'get'; $form->action = './'; // Fieldset $fieldset = $this->modules->get("InputfieldFieldset"); $fieldset->label = "Filters"; $fieldset->icon = "fa-filter"; $fieldset->attr("", "filters"); $fieldset->collapsed = true; // Course Search $field = $this->modules->get("InputfieldText"); $field->label = "Search by Course Number or Title"; $field->description = "Start typing a course number or title to filter the list below."; $field->attr("name+id", "course_search"); $field->columnWidth = 60; $fieldset->add($field); // Semester $field = wire('fields')->get('semester')->getInputfield(wire('page')); $field->attr("name+id", "semester"); $field->columnWidth = 20; $fieldset->append($field); // Year $field = wire('fields')->get('syllabi_year')->getInputfield(wire('page')); $field->attr("name+id", "year"); $field->columnWidth = 20; $fieldset->append($field); $form->add($fieldset); The "semester" and "year" fields are page fields output as checkboxes, and when I render the form in my admin page, the fields and all the available options show correctly (see below). What I'm after is a way to render the form and have all the checkboxes show as checked. Currently renders like this What I need Any help would be appreciated.
  6. What Adrian said. Image fields are already capable of handling multiple images.
  7. This is a bit old, but I'm stubbing my toe on it. I have this working, but when nothing has been selected for "country" the "city" select shows all the root pages starting with home. Is the only way around that to set the "city" visibility to country!="" ? Perhaps I'm just being dense today, but I can't find any other way around it.
  8. I need to generate a selector like this: template=user, roles=faculty, roles=music Where the result is users with the "faculty" role AND the "music" role. Is that possible? I tried: ?template=user&roles=faculty&roles=music but only the last roles query seems to be included in the selector.
  9. @cstevensjr I originally developed it to using [collapse](My TItle Here) and [/end]. I don't have a need to ever use this with pagination, so ----- and ///// seemed so much easier to remember and use. However, I don't think it would be too difficult to add a config setting to allow you to chose between the 2 markup patterns. I'm glad to provide that ability if people can use it. @Martijn I think there is too much to account for to make it configurable. At least it's more development than I can devote to it. For instance <hr> would be more complicated to account for because the <hr/> is it's own element on it's own line, so marker and the text for the title of the collapsed content aren't associated in a way that you could count on. Personally I wouldn't want to override any HTML tags, I think they should always output their expected markup. Perhaps you could use Teppos awesome hanna code helper to give users a clickable option?
  10. Concatenate FieldType Not sure if it works in that scenario, but worth a look.
  11. Hi Adrian, I don't know if you could do that as a pure CSS solution, you would probably have to use JS to check the window width and then swap the .accordion class with a .tabs class. Seems doable, I've styled a <dl> into tabs before (can't find the tutorial at the moment). I've never tried to do pure CSS tabs, but that would be the easiest way if it's possible. I don't have much time to develop this further, but if I can find a need for it here at the day job I might be able to devote some time to your request.
  12. Hi Mike, Great article. I'll post some comments when I get a minute. First thing I noticed was the Pagination Textformatter in action— love it!
  13. Here is a companion module (my first public module). Accordion Textformatter I've had this kicking around for a while. After you released Pagination, I figured I would update it and get it out there. Same idea essentially, but creates collapsed "accordion" content instead of pagination. Hope you don't mind, I leaned heavily on some of your code for the markup pattern. I wanted to make them essentially interchangeable (not that you ever would).
  14. This Textformatter allows you to designate areas in a single textarea to be converted to a collapsed accordion list. The markup pattern for this module is based on the Pagination Textformatter module with the idea that they could be interchangeable. Github Page Simple Demo To define an accordion item Put 5+ hyphens '-----Your Title Here' on a single line (within paragraph tags) to specify a title for the accordion item. The paragraphs below will be collapsed. This is the same idea as the Pagination Textformatter, however titles are not optional. If you just put the dashes, the item with be automatically titled "Untitled". To end an accordion To end a group of accordion items and return to regular textarea content, put exactly 5 slashes on a single line '/////' (within paragraph tags). This is only needed if you want to end collapsed content and return to regular textarea content. Notes I've been using this on a production site for nearly a year, but before Ryan released the Pagination Textformatter it was using with a totally different markup pattern to designate the accordion items. It should be pretty stable, but consider it a beta release. Markup pattern inside a textarea (Nearly identical to the Pagination Textformatter) ----- Accordion Item The paragraphs beneath each accordion item are collapsed by default and open when you click on the title specified above. You can use multiple paragraphs, and any other content allowed in the textarea. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede. ----- Another Accordion Item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede. ///// The 5 slashes above signify an end to the accordion group above. You only need to specify the end of a group if you want to return to regular textarea content. You can continue to use the same pattern to collapse content into accordions as many times as you wish. Results in the following markup: <dl class="accordion"> <dt> <a href="#accordion-item">Accordion Item</a> </dt> <dd> <p>The paragraphs beneath each accordion item are collapsed by default and open when you click on the title specified above. You can use multiple paragraphs, and any other content allowed in the textarea.</p> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p> </dd> <dt> <a href="#another-accordion-item">Another Accordion Item</a> </dt> <dd> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p> </dd> </dl> <p>The 5 slashes above signify an end to the accordion group above. You only need to specify the end of a group if you want to return to regular textarea content. You can continue to use the same pattern to collapse content into accordions as many times as you wish.</p>
  15. I don't even know what to say. Domo arigato Mr. Roboto is all that comes to mind.
  16. Teppo, this looks awesome!
  17. Welcome cwsoft. If you haven't had a chance yet, definitely try out the dev branch. There are some fantastic new things already committed. ProcessWire 2.5 is going to be a giant leap.
  18. Dev branch now supports this. https://processwire.com/talk/topic/5574-field-dependencies-from-a-repeater/?p=64345 There is a new setting in /site/config.php that also needs set.
  19. Christian, You are correct, admin themes are now modules. There is a new admin theme that should be added to the dev branch in the near future that has the navigation in a sidebar. The intention is that it will be part of ProcessWire 2.5.
  20. @Ryan, I've been meaning to mention how awesome these additions are, I use implode() and data() a ton. data() has been particularly useful for passing stuff to markup files.
  21. I can confirm there is something strange happening with 2.4.5 and admin theme switching. It may have existed before that as well. Happens on both Mac/PC and is not specifically related to Modesta. I submitted an issue on github
  22. nikola, This looks great! Looking forward to testing it out.
  23. Oops, forgot to mention the setting in /site/config.php See here : https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/config.php#L238 On mobile...sorry about the lack of details
  24. Hi digitex, Dependencies within repeaters are now working in the latest dev. I think support is limited to (field=value), but that accomplishes a lot. I would also recommend taking a look at the new PageTable fieldType. Apparently it now has support for multiple templates, so you might be able to accomplish what you need without the overhead of repeaters.
  25. teppo, this is great! Thank you.
×
×
  • Create New...