Jump to content


  • Posts

  • Joined

  • Last visited

Thomas108's Achievements

Jr. Member

Jr. Member (3/6)




Community Answers

  1. Thank you both, now it works. I haven't been doing any web work for 3 years and now have to get used to do things in pw again. 😎
  2. Hi there, I just installed textformatterfluidimages on a new site with the latest PW 3.0.98 and it doesn't work for me with images inserted by ckeditor. I tried with and without a custom class, but nothing happened, width remained and no class was given. Refreshed PW and browser cache. Am I missing something? Isn't this meant for ckeditor? Or do i need to call it somewhere? So far I just installed the module. Thanks for your help...
  3. Looks good to me. In the text on the left, I would clearly say that they can contact you by phone and talk about everything or if they prefer they can fill the form. I wouldn't recommend anyone nowadays a non responsive / or non mobile website. I'd rather explain this somewhere else as a quality aspect of your websites. I also wouldn't make Company Name a required field. just my 2cts
  4. @soma: yep, uncomplicated sounds good. But I never used url segments before, so lets see... Tomorrow I'll check the different post about url segments. Have a nice evening.
  5. Regarding my idea of using the Redirects module, I just found out that I'll probably need a wildcard function, which is not implemented in the module. @Adrian: The description of Page Path History sound very promising. Thanks for the link. I'll check it out.
  6. Thanks for all your answers. For now I successfully implemented Andre's code. But now I am aware of the url change. Would be great if I could somehow create a permanent 301 redirect to the new folder "older-entries" if someone wants to open a moved entry within the old folder "news-artikel". Any idea if this is possible? UPDATE: Just found the Redirects module. Maybe that can help me.
  7. Hi. I am using the news system from this tutorial: http://wiki.processwire.com/index.php/Simple_News_System Since the news are just short announcement for one time events, I would like to achieve the following: I want to give the editor a field for setting an expiry date. Expired news should automatically be removed from the main news page, but should be accessible in a folder "older entries". I searched the forum but I didn't find anything similar. Maybe something like this could work, but I don't know how to code this properly: $newsposts = wire("pages")->find("parent=/news-artikel/, $category, template=news, limit=10") (CONDITION)...WHERE EXPIRY DATE FIELD IS NOT EXPIRED What do you think about this approach? Could it work and if so, how is this written properly? Thanks for your help in advance. Thomas PS: Here is the part from my code which fetches the news for the main news page: $newsposts = wire("pages")->find("parent=/news-artikel/, $category, template=news, limit=10"); $out =" "; foreach($newsposts as $newspost){ $out .="<div class='newsitem'>"; $datum1; $datum1 = $newspost->publish; $datum1 = date("d.m.Y - H:i", $datum1); $out .="<a href='{$newspost->url}'><h3>{$newspost->title}</h3></a>"; $out .="<p>{$newspost->summary}</p>"; if($newspost->news_image){ $out .="<a href='{$newspost->url}' class=''>"; $out .="<img class='align_left' src='{$newspost->news_image->size(300)->url}'>"; $out .="</a>"; } $out .="</div>"; } PSS: For the folder "older entries" I guess, I can just use the original code again.
  8. Nope, I used only my correct image field names. I read about outputting images before and used this already extensively on a recent website. Thanks to PW I already made friendship with include, echo, foreach, if, get, and quite a few more, but I saw nowhere a tutorial about using fieldnames in curly brackets {$image_1->url}. Are these special module tags or just plain php? Anyway, thanks for your input so far. Maybe I'll start fresh all over in a few days and see if it gets better somehow.
  9. A small sidenote request: I think it would be really great if you or someone else could supply eventually a basic set of demo templates for this module. Nothing fancy, no css, just the proper php and markup with maybe a few comments where to put what. Thanks for your consideration
  10. Sorry, but I think I did that right. Well now I allowed only one image in my image field and keep using $myImageField->url at least I have no errors. Do I maybe have to put the image url in a variable? <?php $headline1 = ""; $headline2 = ""; $image = $image_1->url; //my trial with a variable didn't work if(!$page->checkbox1) $headline1 = "<h2>{$page->title}</h2>"; if(!$page->checkbox2) $headline2 = "<h2>{$page->text1}</h2>"; echo " <div class='pageTableSection {$page->template->name}'> <div class='inner'> <div class='col one-half'> {$headline1} {$page->body} {$image} // before trying the variable thing I had here: {$image_1->url;} {$textblock_1} </div> </div> </div> "; Anyhow, from this code with or without the commented changes I am getting this markup in my layout field in the admin: <div class="pageTableSection part_tpl_1"> <div class="inner"> <div class="col one-half"> <h2>wtf</h2> </div> </div> </div> Only {headline} gets outputted. Guess I am doing something really wrong here.
  11. hhm, that gives me an Error: Error: Call to a member function eq() on a non-object (line 17 of /home/home1007/public_html/pw/site/templates/part_tpl_1.php)
  12. @mademyday: Thanks for your help I changed my code to: {$image_1->url} // my image field 1 still my images are not visible in the layout elements. But I just realized that I could revert InputfieldPageTableExtended.module to it's original state without getting an error. (And it had nothing to do with my false image call) I really don't know what I did to make the error dissapear, but it's gone.
  13. Hi, first of all thanks for this great module. Unfortunately I can't get it to work as expected. I must admit that I just recently built my first website with pw and I haven`t even had a look at how the PageTable Module works. I use PW 2.5.3 dev and I installed PageTable and PageTableExtended modules. I created two templates with template files that contain the part template code from MadeMyDay on page one of this thread (plus my fields): <?php $headline1 = ""; $headline2 = ""; if(!$page->checkbox1) $headline1 = "<h2>{$page->title}</h2>"; if(!$page->checkbox2) $headline2 = "<h2>{$page->text1}</h2>"; // Output echo " <div class='pageTableSection {$page->template->name}'> <div class='inner'> <div class='col one-half'> {$headline1} {$page->body} {$image_1} // my image field 1 {$textblock_1} // my text field </div> <div class='col one-half'> {$headline2} {$page->textarea1} {$image_2} // my image field 2 {$textblock_1} // my text field </div> </div> </div> "; Then I created one image field and one Textfield and assigned them to my part templates. After this I created one PageTableExtendedField and selected my 2 part templates under the details tab and title, Image_1 and textblock_1 under the Input tab as table fields to display in admin. I checked: Render Layout instead of table rows I didn't put any stylesheet yet. In my basic-page.php I pasted this part: <?php $bodyclass='inner'; $content = "{$page->body}"; if(count($page->layout)>0){ foreach($page->layout as $l){ $content .= $l->render(); } } What I am getting now in the backend is an error: Error: Call to a member function of() on a non-object (line 101 of /home/home1007/public_html/pw/site/modules/FieldtypePageTableExtended/InputfieldPageTableExtended.module) I outcommented line 101: // $parsedTemplate->page->of(false); // set OutputFormatting back to false, just in case Now I saw my part_templates as two buttons only in the backend. After I expanded them I could enter title and name. I did this and then I was also able to enter an image and some text. Now it looks like this, both fields have an image, and some text, but in the layout elements only the titles are displayed: Only when I press the edit button on the right side, I can see my image and my Text. Also the two buttons remain on the bottom. (Don't know if this should look like this) Obviously I did something wrong, but I couldn't find any more precise instruction for either PageTable or PageTableExtended. Please bear with me, I still got a lot to learn and I would be very happy if someone could tell what I did wrong or what I have to do more to set set this up properly. Regards, Thomas
  14. Hi, I would like to show a field only on (a) certain page(s). I unsuccessfully tried to accomplish this in three different ways: Show this field only if ... categories=1030, categories.count=1 $page->id=1030 page=1030 But the field keeps appearing on all pages with this template. I am currently using PW 2.4.7 Any help appreciated
  15. Wow great, you saved my day. Believe it or not, some hours ago I tried to change the code with exactly the same line $(this).after("<small>" + $img.attr('alt') + "</small>"); But I must have done something wrong, because the small tag appeared within the img tag. I will study now what you did differently. Thanks a lot!
  • Create New...