Jump to content

Wanze

PW-Moderators
  • Posts

    1,116
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Wanze

  1. Of course... thanks ryan. Makes sense. I used localUrl already, it should have been clear that localName() exists too Pw rocks!
  2. Nice, thanks ryan Another thing i noticed thought I don't know if intended this way: If I output the name of a page when another language than the default ist set, the name of the default language gets returned. Example: // Language is german, name of the page is artikel in german echo $page->name; // Returns articles (default language), not artikel
  3. Hi alishaantony, welcome! Which plugin do you mean exactly? I suggest to read through the docs first. It's as simple as this: // In template where your html markup is, we output the title of each page in the <title> tag <title><?= $page->title ?></title>
  4. Have you created the fieldset fields? They only appear if you actually created a fieldset or fieldsetTab field.
  5. Feature request: When creating a link in TinyMce in a language other than default, ProcessPageEditLink generates the url of the default language, not the "local" one. Would be nice if ProcessPageEditLink inserts the url based on the language of the field one is creating the link. I guess this could be a tricky one...
  6. I don't think it's possible. To achieve your goal, you can make 'Your details' an InputfieldMarkup and add the lables / input fields yourself (HTML markup).
  7. Did you enable urlSegments on your template? I'm not sure if it works with a template other than admin. The admin template has a select field called "process" where you define which Processmodule gets executed when visiting the page in the admin.
  8. As far as I know, you can't enable/disable outputFormatting on fields, but on pages. Did you mean: $page->of(true);
  9. You can do this in ProcessModules. If no URL segment is given, ProcessWire executes the execute() method of your class. If you visit the module with an urlSegment, Pw executes the executeNameofurlsegment() method. Example: I used this in my Google Analytics module to load the statistics for the different sections with ajax: https://github.com/wanze/ProcessGoogleAnalytics/blob/master/ProcessGoogleAnalytics.module#L357 What does the code of your module look like? Do you extend Process?
  10. Problem is that you search only published pages. Try adding include=all to your selector, this will also give you unpublished pages.
  11. Not sure if I understand correctly Just make as many thumbnails as you want from an image field. If you store the thumb separate, you have to manage two fields with the same data = bad. // Make a thumbnail 100x80 px from a field called $image $thumb = $page->image->size(100,80); echo "<img src='{$thumb->url}' alt='blub'>
  12. Which class does your module extend? Because if you don't have API variables like $this->pages available, then maybe you do not extend Wire or a sublcass of Wire. There is also a method ready() which should garantuee that all API variables are loaded. Maybe trying to add your hooks there instead of init(). If you want use functionality of the PageRender module, maybe you could extend the PageRender class itself and overwrite methods for your needs?
  13. Hi autobahn and welcome! I think you have a PHP (logic) problem. You must initialize your $timesheet_item_list variable before the foreach loop, otherwise PHP doesn't know it afterwards (Scope). Also you want to append the output of each loop to that variable. // Initialize $timesheet_item_list = ''; foreach ($page->timesheets as $timesheet_item){ $timesheet_item_list .= '<li class="clr_fx">....'; // Note the dot before '=' // ... }
  14. Yes, you can configure the cache at template level. The settings are in your template: Setup > Templates > Choose template > Cache
  15. No it's not. Unless you need urlSegments for other purposes. I suggest to make another installation with Pw dev to test out the new language modules/features. It's very logical and simple. Basically the module allows you to have different names for all your configured languages per page.
  16. This is the "modx" internal cache. In Pw, this is compareable with the Template Cache. However, if you have no template cached, then there's no cache to clear in Pw. But each browser has its own cache to load pages faster. Sometimes when changing assets like CSS, JS, Images etc. it's good to clear the cache to make sure the changes appear.
  17. If you have another admin theme than the default, then your logo is in /site/templates-admin/ not /wire/templates-admin/. Otherwise clear the cache or realod your page 10 times fast
  18. Thanks! Glad it helps others With external tables you mean custom tables in the same database as Pw? So that one can select the table and columns to edit, e.g. map the columns to Pw-Fields and then handle the CRUD. This sounds great, but IMO this would be a different module because the data is stored "outside" of Pw.
  19. This is really awesome! Never heard of this plugin before. I'm thinking of integrating Handsontable into Batcher, there are some other feature requests pending I wanted to integrate sooner or later. Kongondo, are you already developing a separate module? What do you think? Cheers
  20. Did you try create the page first and then set the date (save the page again after it exists). At least it's possible to set the created property on the page object, so I think the save should work too: Edit: See teppos post below, it's not that easy // In Page.php case 'created': case 'modified': if(!ctype_digit("$value")) $value = strtotime($value); $this->settings[$key] = (int) $value; break;
  21. The name of the default language can't be changed in Pw, but the title. If you have changed 'default' to something else in phpMyAdmin, then maybe that's causing the error? Try to change the value to 'default' again. Check the name fields in your home-page (under the settings tab). I guess that the Dutch name has the value 'start' there.
  22. You're welcome! If you just load the page for editing, then isPost is false. This means that the JqueryWireTabs get loaded. I belive the reason behind the check is that if we're dealing with a save-request, there's no need to load UI stuff like JquerWireTabs, because Pw does a redirect after the save. $this->isPost is used multiple times in the module, so it makes sense to save this long boolean expression in a variable which is easier to read.
  23. Hi videokid, Can you also post the code-snippet that is responsible for this error? Thanks
  24. // determine if we're going to be dealing with a save/post request $this->isPost = ($this->input->post->id > 0 && (((int) $this->input->post->id) === $this->page->id)) || $this->config->ajax && (count($_POST) || isset($_SERVER['HTTP_X_FIELDNAME'])); True when there's a request to save the page.
  25. Just read your post about Fieldtypes/Inputfields. Thanks! Very useful informations! Keep it up
×
×
  • Create New...