Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by 999design

  1. This post was really useful for me when outputting a preselected value within the form so thank you @Xonox and @elabx. In our case, we are showing different course pages that each include an enquiry form created with formbuilder (embed c option). Using your tips above, the form will preselect the course of interest based on the course page you are viewing. This all displays perfectly on the front end. One thing I've noticed though is that this value doesn't pass through to the form entries or the email that is automatically sent to the administrators once it is submitted. It does work when the selected course is different to the course page that is being viewed. I've limited experience with hooks and just wondered if anyone knew of a way to pass the course name into the course entry though, which would be a little easier for the client. I've put a temporary fix in place that involves creating a hidden form field that stores the current page name, so administrators can at least get a sense of what course page the form was submitted and put two and two together, when the pre-selected value is the actual course page being viewed.
  2. We have also reverted to using Ryan's TextformatterVideoEmbed module and seems to be working now with original YouTube links in single p tags.
  3. I've just noticed from today that YouTube video urls don't appear to be working. Vimeo and Twitter examples worked fine but I can't seem to get any Youtube URL to work now. Is anyone aware of what this could be. I've tried different urls in different fileds but am having no joy. Previous links that works have now just reverted to a line of text. Any help or advice would be greatly appreciated. Thanks
  4. This really helped us @teppo thank you :) We're now displaying a link to the parent page when it finds the search term within the child block (sub page rendered on the parent page as a block). We set the auto description to _auto_desc to enable the search term to show highlighted within its surrounding text. 'result_summary_field' => '_auto_desc', This works perfectly when the search term is found on the parent page: Result = Parent page title, parent page url and auto description found within the parent page However, we're not seeing the auto description appear when it finds the search term within the child page block that is rendered on the parent page: Expected Result = Parent page title, parent page url and auto description found within the child page. So while it is searching and finding the right content and displaying the correct page from this, it's just missing the contextual auto description from the content that it has searched, meaning that some results have a summary and others don't where it can't display the child page summary. Apologies for the awful description here. Are you able to give us any pointers? Thanks again
  5. Thanks for that, I could see why that should work but not having much luck. We have even removed the multiple forms, and just left the one on the page but we still see duplicate entries? I should mention the form is in a modal, but not sure why that would effect anything?
  6. Hi all, Running into an odd error that I can't seem to get my head around. We have 2 separately created Formbuilder forms sitting on a single page. But we keep experiencing weird results with them, originally we couldn't get one of the forms to ever submit so we ended up disabling CSRF for them which let us get around this issue. However it then causes a problem in that with CSRF disabled, one of forms always records 2 entries on submission. Just a straight duplicate within the entries for that form. So trying to stop this happening we tried enabling CSRF again and although that does stop the duplicated entry, it ends up giving really weird feedback such as the attached screengrab. Hazarding a guess I assume whatever is trigger on submission is firing twice because of the presence of the second form, but I have no idea why this would be the case as they are 2 seperately named forms? Any ideas?
  7. That's amazing, thank you very much for the detailed reply @teppo . We now have a few good options to suggest to our client. Much appreciated 🙂
  8. Hi @teppo, thanks very much for creating this module. We are looking to include a site search on a client's website. The website uses sub pages as on-page blocks that are rendered out as part of the parent page (allows for some nice flexible layouts). Do you know if this module would be suitable for also searching through these blocks and displaying the relative parent link in the search results?
  9. Apologies for the delayed reply. Was working on a deadline when I raised this issue and completely forgot to leave an update. It suddenly began to work and I'm not quite sure why but I suspect that it was a caching thing, or maybe as you suggested regarding only updating new entries. It's filtered through all the links using this now that were previously not updating so I'm happy either way 😃 Thanks for all your help here @adrian.
  10. I've been checking on the front end and in the admin. Have also tried on an incognito window but no joy. I don't have caching set on the pages either. I'll try to have a look through the module and see what I can find. Thanks for the quick replies, much appreciated.
  11. Hi @adrian Just checked and yes, it's storing the page ID. I'm probably doing something really stupid. I double checked the module files and everything matches your fork.
  12. Hi @adrian I've downloaded the most up to date files from your branch and have overwritten the original module files in a site I am working on. I've refreshed the modules in the admin too, but I just can't get the urls to update if a page is moved or its url is changed. Do you know if I am missing something really simple? I thought it may have been because I am trying to do this retrospectively to existing assisted url field but I tried creating a new field and the problem still persists. Any help of advice would be greatly appreciated. Thanks Dave
  13. Thanks for the information @Jens Martsch - dotnetic we'll certainly take a look through that. Luckily that shouldn't be a problem as our client who will be creating the files that are to be secured, will be the only person that is logged in. Good to know that though. Thanks again
  14. Thanks @wbmnfktr good suggestion. I did already try this though, logged into the cms on Firefox and with an incognito windo open in Chrome to view the front end site. Thanks
  15. @wbmnfktr just tried it out there and it doesn't seem to work on pre-existing files I'm afraid. I'm not sure whay that would be, but now that I know, we can try to build it into our solutions from the beginning. This is for a new project so we'll set it up before adding any content. Thanks again for the help. Much appreciated.
  16. @wbmnfktr wow, wasn't expecting it to be that simple. Thank you very much for such a quick response. 😀 It appears that this only kicks in to effect on newly added files though, so I guess it would be wise to set this up ahead of creating a new site and adding any content? Do you know of any way for this to consider pre-existing files? Thanks
  17. Hi everyone Our client has asked for the following features: CLIENT REQUIREMENT 1 "Ability to pre-publish files with a publish-at date, before which the files are not visible or accessible. Also the ability to un-publish files with a publish-end date, after which the files are not visible or accessible. The above should not permit url farming / guessing. Simply not linking the new files on the site is insufficient. Also, if the page containing these files is unpublished the files should also be inaccessible." Our Thoughts... We had considered creating an area within the page tree for pages that contain each file, allowing us to use a page reference filed to select the relevant file. Our thinking was that publishing/unpublishing these pages as and when required would allow files to be accessed/inaccessible... However, we've tried unpublishing a page to see if the files associated with it are also unpublished/inaccessible, but the file it is still visible if you have the path. CLIENT REQUIREMENT 2 "Deleting data / documents from the CMS should make the data inaccessible but the documents should still be viewable by admins." Our thoughts... It's almost like they need some kind of holding pen for a file, between being deleted completely and just not visible through any url. Has anyone tried to do anyhting like this before and do you have any pointers? We've seen this module http://modules.processwire.com/modules/fieldtype-secure-file/ but it doesn't appear to be compatible with version 3. Thanks in advance for any help.
  18. Update: I hadn't read the documentation properly and was able to add a custom class to pages that had the checkbox field checkbox_nav_prominent checked 🙂 function hookGetListClass(HookEvent $event){ $child = $event->arguments('page'); // current rendered child page $class = $event->arguments('class'); // the class string already present // any check on that child to set your custom class if($child->checkbox_nav_prominent == 1){ $event->return .= " is-prominent"; // add your custom class to the existing } }
  19. I love this module, but I've finally found something that I can't figure out how to do. I'm trying to style particular item(s) in the navigation different to the others by updating a class on that item, how would I do this? For example a "Donate" or "Sign up" page that I want to have more prominent styling. I've added a checkbox to my pages to say something along the lines of "Make me prominent in the navigation"... but I'm not quite sure how to hook that into markupsimplenavigation's options? Is there a way to say - if this page has the checkbox checked, add the "prominent" css class to the its menu item markup? Thanks in advance for any support :)
  20. Hey - thanks for the quick reply, looks like exactly what I need. Will have a go at implementing!
  21. Hi, I have some pagination on my page, which is pretty bog standard. $allChildren = $page->find('template=blog-article, limit=10, sort=-article_date'); The limit is set to 10 as I want to show them 10 articles at a time. The articles are displayed side by side, so there is 5 rows of 2 article. I am using infinite scroll plugin (which doesn't really matter). However the first article is a featured article and displays full width, so this leaves me with an odd article at the end. - - - (1) - - - - (2) - (3) - - (4) - (5) - - (6) - (7) - - (8) - (9) - - (10) So really I need the first page to show 11 and then on other pages for it to be 10. - - Page 1 - - - - - (1) - - - - (2) - (3) - - (4) - (5) - - (6) - (7) - - (8) - (9) - - (10) (11) - - - Page 2 - - - (12) (13) - - (14) (15) - - (16) (17) - - (18) (19) - - (20) (21) - - - Page 3 - - - (22) (23) - - (24) (25) - - (26) (27) - - (28) (29) - - (30) (31) - Is this possible? Any pointers would be much appreciated! Thanks, Craig
  22. Hi Guys, I wanted to find all pages which are children of the current page: $rootPage = $page->children(); But I then want to filter out all pages of a few different templates: $rootPage = $page->children('template!=cta-block|puffs-block|table-block'); But also filter out one specific template called company when the pages website textbox has no value: $rootPage = $page->children('template!=cta-block|puffs-block|table-block')->not('template=company, website='); This doesn't work - I have tried a few different variations, but can't get it right. Anybody point out where I am going wrong? Thanks, Craig
  23. Hi guys, Thank for the replies, works a treat. Thanks for the extra info on the date time stuff. Thanks, Craig
  24. Hi, Run into a bit of an issue with pagination on a site I am working on. I am sure the answer is really simple, but struggling to figure out what's going wrong. I have a bunch of articles, but I only want the ones where the date is less than the current date. I then want to limit the array so that I can paginate it. <?php $allNews = $page->children("template=news"); $oldNews = new PageArray(); foreach($allNews as $article) : if(strtotime($article->date) <= strtotime('now')): $oldNews->import($article); endif; endforeach; $oldNews = $oldNews->find('limit=2, sort=date'); echo $oldNews->renderPager(); foreach ($oldNews as $article) : ... endforeach; ?> The limit is being applied, however I don't see any pagination and navigation to the different pages returns the same first two articles. Any help would be much appreciated. Thanks, Craig
  • Create New...