Jump to content

doolak

Members
  • Posts

    319
  • Joined

  • Last visited

Everything posted by doolak

  1. I have another problem... I am trying to access the value of an options field through the Webservice - the returned JSON is this: "mf_termin_schwerpunkt":{"1":{"id":1,"sort":0,"title":"black","value":"" and, if multiple options are selected: "mf_termin_schwerpunkt":{"3":{"id":3,"sort":2,"title":"blue","value":""},"2":{"id":2,"sort":1,"title":"green","value":"" I want to show the result just if the selected option matches "black" and tried already: if($mf_termin->termin_schwerpunkt == 1) { ... } if($mf_termin->termin_schwerpunkt->id == 1) { ... } if($mf_termin->termin_schwerpunkt->title == "black") { ... } But none of them worked. The problem seems to be that an option field is again an array and I cannot manage to access the values: Would be great if someone could help me with this problem!
  2. Found a solution - FieldtypeConcat worked fine for this.
  3. Hi there, I am trying to show the static map linked with the Google Maps page? Is there a possibility to include the content of the CKEditor field (which contains that link) unformatted but still use the formatted code for the map? So it should be shown like this: <a class='map' href='https://www.google.de/maps/place/XYZCompany/@53.17363,8.94532,17z/data=!3m1!4b1!4m2!3m1!1s0x47baaf1431b6b1cd:0x8672b17350e41d9c' target='_blank'> <img style='max-width:100%;height:auto' width='200' height='200' src='//maps.googleapis.com/maps/api/staticmap?sensor=false&center=loc:52.17363,9.94532&markers=loc:53.17363,8.94532&size=200x200' alt='' /></a> Is there an option to show the unformatted content for the link and the formatted content for the map?
  4. Perfect! Thanks so much! Works brillant with echo "<img class='termin_thumb' src='http://xyz.de/site/assets/files/".$termin->id."/".$termin->mf_termin_image->basename."'>";
  5. But - I have another question: When I want to display an image through the JSON service page, how can I do this? The Service page displays just the basename, not the path of the image - is there a way to show the path somewhow by adding "->url" like shown below (which does not work)? <?php $json_file = file_get_contents('http://xyz.de/service-pages/?template=mf_termin'); $jfo = json_decode($json_file); $posts = $jfo->matches; foreach ($posts as $post) { ?> <li> <h2><?php echo $post->title; ?></h2> <img src="<?php echo $post->mf_termin_image->basename->url; ?>"> </a> </li> <?php ?>
  6. OMG - my fault... wrong thinking in syntax. Everything works fine!
  7. Tried it now for the first time - the query "service-pages/?template=mf_termin" shows the following: {"selector":"template=mf_termin, limit=25","total":1,"limit":25,"start":0,"matches":[{"id":1018,"parent_id":1016,"template":"mf_termin","path":"/termine\/lorem-ipsum-dolor-sit-amet-consetetur-sadipscing\/","name":"lorem-ipsum-dolor-sit-amet-consetetur-sadipscing","created":1437313802,"modified":1438870554,"created_users_id":41,"modified_users_id":41,"title":"Lorem ipsum dolor sit amet consetetur sadipscing","mf_termin_datum":"31.07.2015","mf_termin_image":{"basename":"mf_termin_blank.png","description":"","tags":"","formatted":false,"modified":1437315061,"created":1437315061},"mf_termin_info":"","mf_termin_kurzinfo":"<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.<\/p>","mf_termin_ort":{"lat":"0.000000","lng":"0.000000","address":"Musterstrasse 1, 12345 Musterstadt","status":0,"zoom":12,"skipGeocode":false}}]} So that seems to be fine i guess. But with the query "service-pages/?template=mf_termin&field=mf_termin_kurzinfo" I receive the following error: {"errors":["Field 'field' is not allowed in queries"]} What am I doing wrong? How can I access specific values / fields?
  8. Thanks a lot, will give it a try then!
  9. I would never use it! Have a costumer which has a very extensive website and want to switch part by part to PW... Had a quick look at Pages Web Service - how do you think could that be useful? Include via JSON?
  10. Yes, I wanted to do it exactly like you described - tried to include / inject PW in an excisting TYPO3 website. There is an easier way, already included several PHP scripts with tt_content.script: tt_content.script = CASE tt_content.script { key.field = select_key FORMULAR = PHP_SCRIPT_EXT FORMULAR.file = fileadmin/xyz/include/landingpage/index.php } But with PW I receive the error in PW... Yes, there seem to be a template class in TYPO3: https://docs.typo3.org/typo3cms/InsideTypo3Reference/CoreArchitecture/Backend/TheTemplateClass(templatephp)/Index.html If this is the problem - any idea for a workaround?
  11. In debug mode I received an error message: Error: Call to undefined method template::getTableData() (line 115 of /srv/www/xyz/htdocs/pw/wire/core/WireSaveableItems.php) As I thought the problem could be related to the wrong PHP version (the webserver runs still on PHP 5.3.3) I tried an older PW version (2.3.1) which should work on that PHP version, but I still receive a similar message: Fatal error: Call to undefined method template::getTableData() in /srv/www/xyz/htdocs/pw/wire/core/SaveableItems.php on line 108 So the PHP version does not seem to be the problem - does anyone has an idea what could be the problem?
  12. Hi there, does anybody have experience with including PW data in a TYPO3 website? I have already included PW in other systems, but so far could not get it work in TYPO3. I included this PHP script: <?php include("/srv/www/xyz/htdocs/pw/index.php"); $termin_page = wire("pages")->get("/xyz/termine/"); $termine = $termin_page->children; echo "<div id='pw_termine'>"; foreach($termine as $termin) { echo "<div class='termin'>\n"; if ($termin->termin_image) { echo "<img src='{$termin->termin_image->url}' title='' />\n"; } else echo "<img src='/fileadmin/xyz/include/termine/termin_blank.png' />\n"; echo "<h2>{$termin->title}</h2>\n"; $date = date("d.m.Y", $termin->getUnformatted("termin_datum")); echo "<span class='datum'>$date</span>\n"; echo $termin->termin_kurzinfo; echo "</div>\n"; } echo "</div>"; ?> In this way I get an Internal Server Error. Then I tried to include PW as a seperate script and then include the script above without the PW include - but in that way I get the follpwing error: Fatal error: Call to undefined function wire() in ... So PW was not included. Anybody who successfully included PW into TYPO3 out here?
  13. Have the same problem here - would there be a possibility for a workaround without having to upgrade PHP?
  14. The aim for me is to give the admin the option to enter a heading which can contain two rows - when I use a textarea field he has to use <br /> - when I use CKEditor the heading will be wrapped in <p></p>. I guess one could use the sanitizer function and of course simple PHP, but I would have to place that in each template where a heading is used... So it would be great if I could strip the tags through the CKEditor somehow...
  15. I already tried that, but it gives an error ("Custom Config Options failed JSON validation.").
  16. ... or is there maybe another way to strip unwanted tags in a different way? (without having to strip the tags in each template where that field is used?)
  17. Hi there, I would like to remove the <p></p> - tags from a CKEditor field - tried now disallowedContent: p but this does not work. Any idea how to get that work?
  18. Great, so you seem to work with a similar "contentblock-syste," for you backends ;-) Will support your wish and have a deeper look into "pagetableextend" - never used this until now...
  19. Yes, the problem is not the Options fieldtype - it seems that although the Inputfield Dependencies are working in a repeater, the content of a field is not saved if it has a dependency.
  20. Made a short test now and found out that it will work when it is used without a repeater - guess it is not supported right now to use it in a repeater field... If that could be fixed, would be so great!
  21. Hi there, I am trying to use an options field in a repeater to offer the possibility to choose the kind of input which will be shown in that element: If one choose "Text", just the textarea will be shown, if one choose "Foto", just an image can be added. This works fine so far, but if I add content to the textarea or choose an image and save the page, those contents are not saved. Any idea if I just make something wrong or will that just not work in that way? Cheers, Christian
  22. Hi there, tried to add the code in the inputfields.js - but in my case (maybe this was changed in PW 2.5+ ?) PW is using the inputfields.min.js - so I had to add it there. BTW: +1 vote for such an option in the settings (Show repeater items collapsed/open) ! And what else would be really great - im my opinion: 1. A possibilty to add an alternative singular version of the Label (e.g. Repeater Label = "Slides" / Element Label ="Slide") 2. The possibility to set a limit of elements in a repeater
  23. @Soma: Perfect - thanks a lot! @kongodo: yes, I am talking about the Field of the type Page and I am talking about the Page Tree in the admin. Under the advanced settings of a page you can choose the fields which should be displayed in the admin Page Tree and if you just enter the name of a field type Page its number will be displayed. e.g. : title, name_of_the_pagefield will display the title of the page and the ID of the page which is chosen in the pagefield But as Soma suggested, it will work like this: title, name_of_the_pagefield.title will display the title of the page and the title of the chosen pagefield page Maybe it's easier to see here: Cheers and thank you guys!
  24. Hi everybody, I want to display the title of a Page Field instead of the number in the admin Page List - is this possible? Cheers, Christian
×
×
  • Create New...