Jump to content

Juergen

Members
  • Posts

    1,223
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Juergen

  1. Its not a really big problem. Somas module work as expected. It would only be nice if all hooks from front and backend could be managed without a module in one place.
  2. No this doesnt work. It is also not possible to choose one specific template with this condition, because more templates have the same process :-(
  3. if(($page->template == 'pricelist') OR (($page->template == 'admin'))) { The addition "$page->template == 'admin'" fetches the admin template in backend too, but in this case the hook is added to every template in the admin. I have tried to add the page id of the pricelist template in the admin section too but this doesnt work. if(($page->template == 'pricelist') OR (($page->template == 'admin') AND ($page->id == '1409'))) { Is there a way to fetch only a specific admin template?
  4. Hello @ all, I have tried the new hook files (init.php, ready.php and finished.php) from the latest update (2.6.7) on the dev version and they work well on frontend. But I havent got it to work in backend. Here is a test example that runs on frontend as expected: $page->addHookAfter('render', function($event) { $page = $event->object; //test if($page->template == 'pricelist') { // $value contains the full rendered markup of a $page $value = $event->return; $value = str_replace("</body>", "<p>Hello World!</p></body>", $value); // set the modified value back to the return value $this->message("Hello world added"); $event->return = $value; } //test end }); It is only a test that adds "Hello world" on pages with the template "pricelist" on the frontend. But it doesn add anything in the backend on the pricelist template. Is it possible to use this new files to add hooks in the backend too and if possible how? At the moment I use a module from Soma to add hooks in the backend (HookAfterPageSave-Module). Thank you for your answeres
  5. This was the problem. I have forgotten to include the child pages template. Thanks Wanze
  6. Thanks LostKobrakai. Thats a quite good idea to try it out.
  7. Is it possible to include child pages in the PDF?? I have created a pricelist and each item of the pricelist is a single page. On the pricelist template I output all child pages with a foreach loop. The result is my pricing table. Unfortunately on the PDF the content of the child pages is not visible, so I have an empty page.
  8. Thank you Nicolas and Macrura for your suggestions!!! Unfortunately I have forgotten to mention that the child pages are part of a Page table field on the parent page. So here is my solution to search the Page table field with its "sub fields" from the child pages and output only the parent page in the search results if a search term was found in one (or more) child page(s). This are the fields of the Page table field to search: $pricelistfields = "servicepricelist.title|servicepricelist.description"; The Page table field name in my case is "servicepricelist" and I search in the "title" and the "description" field which are part of the child pages. The next step is to exclude all the childpages in the search to prevent duplicate content. $selector = "$searchfields~=$q, template!='pricelistitem', limit=50"; $matches = $pages->find($selector); I add "template!='pricelistitem'" to the search selector, because the template name of the child pages is "pricelistitem". So I get rid of all matches in the child pages directly. It only shows matches in the parent page. Thats all!
  9. Hello @ all, I have a parent page (pricelist) with a lot of child pages (pricelistitems). I use the standard search code from this forum for my search result page and it works quite well. The structure of the pricelist: -pricelist (parent page) -priclistitem1 (child page) -priclistitem1 (child page) -priclistitem1 (child page) -priclistitem1 (child page) ........ The parent page is the main page and each pricelist item is a child page. They all are real pages with their own url. Problem: If I search for a specific term and this term could be found in a child page, then I got the URL to the child page in the search result. This is what I do not want. I want to get only the url to the parent page in this case, because this is the page visible to the visitor. The child pages are only parts of my pricelist. I have searched the forum and found some similar entries but not exactly what I am looking for. Can anyone point me into the right direction?
  10. It would be great if the pages inside a Page table field would be sortable (each column) and searchable. If you have a lot of pages (fe. 50 pages) inside a Page table and you want to edit a specific page you have to look for it manually. So it would be great to add a searchfield or maybe even a filter to search for a specific page inside the Page table. I would make working with Page table much more comfortable.
  11. It would be great to add limitiations (f.e. output 7 repeats without the possibility to add or to remove a repeat) to the repeater fields (like permanent repeats) This can be used for example for opening hours (output 7 repeats each for one day). The customer has no possibility to delete or add another repeat. The limitations should be placed under the details tab.
  12. @iNoize As fas as I know it is not possible. I have worked in the past with api forms and gave it up. I also needed a special markup (in my case Bootstrap). It was not possible to get the exact output as I wanted. Therefore I write forms manually. It is the best way to get full control over the output.
  13. Havent installed it yet, but is this module ready for multilingual sites? Best regards
  14. Yes this would be a nice feature. It is always frustrating if you are checking your language files for untranslated strings and then you find out it is only the same as the original string and no missing translation.
  15. Thanks I have founded it out too a moment ago, but you were a little bit quicker - works fine!
  16. So, now it works as expected with this piece of code, but I cannot find a explanation how to delete the value of the specific field: if(($page->template == "pricelistitem") AND ($page->pricetype == "1")){ $this->message("Angebotspreis wurde entfernt"); CODE TO REMOVE THE VALUE OF THE FIELD "OFFERPRICE"??? } The message will be shown if the pricetype field is 1 (= standard price). How can I delete the value of the field "offerprice" so the field will be blank??
  17. Wow, you have eyes like an eagle - I havent seen this small mistake - now it works! Thanks!!!!!!
  18. I have tried to install the module as it is (only for testing purpose) and I always get the following error messages if I want to install it: Fatal error: Class 'HookAfterPageSave' not found in /home/.sites/24/site1275/web/wire/core/Modules.php on line 392 Error: Class 'HookAfterPageSave' not found (line 392 of /home/.sites/24/site1275/web/wire/core/Modules.php) This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged. The file is placed in the site/modules/HookAfterPageSave/HookAfterPageSave.module
  19. Thank you diogo for your answere. The visibility on field dependencies is quite a possibility but.... 1) in this case the value is still stored in the DB and will be also fetched via the search engine (I mean my site search not Google ). Thats one reason why I want to get rid of it. 2) I use Pagetable for all the prices in my pricelist - so every price item is one single page. And in the pagetable I have the column for the offer price. So it contains always the value of the offer price if it is filled out (independent if the price is standard price or not) - this could be confusing for customers.
  20. hello @ all, I want to find out if this is possible in PW. I have 3 fields in a template: field 1: Option fieldtype with 2 options to select (single choice). -option 1 (standard price) -option 2 (offer price) field 2: Input fieldtype decimal for the standard price value (fe 10€) - equals option 1 field 3: Input fieldtype decimal for the offer price value (fe 5€) - equals option 2 So here is the process: 1) Select if the price should be a standard price or a offer price 2) If field 2 and 3 have values in it - then delete the value of the option which is not choosen after pushing the save button. Example: I choose standard price (option 1) Field 2 (standardprice) will be filled with the value 10 € by me Field 3 (offerprice) contains the value 5 € from an earlier time as this was an offer. After saving the article the value of 5€ from field 3 should be deleted because I have choosen option 1 (standard price). Therefore the offerprice is no longer needed and should be deleted. I hope it is clear what I mean. SO IS IT POSSIBLE TO DELETE THE VALUE OF ONE FIELD DEPENDING ON THE VALUE OF ANOTHER FIELD AFTER PRESSING THE SAVE BUTTON? Best regards Jürgen
  21. @netcarver, first of all thanx for the awesome module. Are there any news about a blank value as Beluga pointed out? I also need a blank value for opening hours. Best regards
  22. On my computer the problem is still there. I have tested it also with different browsers (Firefox, IE, Safari - always the latest version) - very strange behaviour. If some other users read this maybe they could test it on their computers and post their results here.
  23. In my case the redirect of the link doesnt work so the target is "http://new.korona-licht.de/produkte/systemprodukte/", which is the blank page. If it would be redirected to "http://new.korona-licht.de/produkte/#!systemprodukte" I could see the content - but this doesnt happen.
×
×
  • Create New...