Jump to content

Peter Knight

Members
  • Posts

    1,465
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Peter Knight

  1. I get it. Once I have a page ID, I can make a connection between and selected PDF and it's page. So if I have a form (using FormBuilder) and a PageSelect field outputting an array of checboxes called "select_your_case_studies[]" <div class="InputfieldContent "> <div class="InputfieldCheckboxes"> <ul class="InputfieldCheckboxesStacked"> <li><label><input type="checkbox" name="select_you_case_studies[]" id="Inputfield_select_you_case_studies_1412" value="1412"><span class="pw-no-select">Condé Nast</span></label></li> <li><label><input type="checkbox" name="select_you_case_studies[]" id="Inputfield_select_you_case_studies_1413" value="1413"><span class="pw-no-select">Charles Stanley</span></label></li> <li><label><input type="checkbox" name="select_you_case_studies[]" id="Inputfield_select_you_case_studies_1414" value="1414"><span class="pw-no-select">Global Logistics Firm</span></label></li> </ul><input type="hidden" class="findPagesSelector" data-label="title" value="template=a-document, Document_Type=Case Study"> </div></div> Would I use the following to echo the selected check boxes? $value = $input->post['select_your_case_studies']; I'm unsure as to why nothing is outputting on my confirmation page.
  2. I actually had this error a few times and seemed to solve it by renaming the file. I used underscores instead of dashes and that seemed to work. Are you sure it's an image size issue rather than a naming convention?
  3. What I'd like to do is dynamically display them. IE Although I have a dedicated page listing all available PDFs with links to them, I'd like to display just the PDFs which had checkboxes ticked. Possibly I can pass a CSS class to the PDFs not selected to hide those on the page etc
  4. Hi guys Probably more a general Dev question so I'm posting it here. I have a Document Request form form. Apart from basic fields for name, email, phone etc, I also list 10 PDF titles and a checkbox for each. The form itself is created using an online form service. I'd like to display a download link on the confirmation page corresponding to each checkbox ticked. AM I correct in thinking this is the realm of URL parameters and combined with some PW selector? If it's any help, each PDF is actually a page in PW with a template called "document-detail". Just looking for broad tips right now while at planning stage.
  5. A native PW system would be great and a great showcase too. Having used Trello in the past for MODX I wasn't convinced it brought any value. Actually - I just tried to login to the MODX Trello account and it's been closed.
  6. Hey @rot Module sounds interesting. Any further progress?
  7. Possibly not but I've found there are less mistakes. The extra 0000.5 seconds it takes are worth it. Less mistakes and less support calls.
  8. Hi Nurkka I found this quite difficult initially too. Primarily because I was expecting PW to behave like another CMS I use. If the parent pages doesn't have any restrictions set in the Access/Family tabs then I find it's much easier to go to Settings and the Parent options. Some might argue that it's slightly more work but I've found it's also more accurate. Would that work for you?
  9. Hi guys. Just a query - nothing relevant on Google. I have about 400 blog posts which need tagging and categorising. I already have a list of about 5 known words I need tagged and applied to each post via pageselect field. IE cat, dog, fish Is it possible to somehow scan my 400 posts body field for these cat, dog, fish words, and then auto-tag them? Just a query at the moment.
  10. Ok, I understand the logic so thanks for clarifying. I still think my Map Overview page possibly has a different setting as it's pulling in points not from it's own PageTable children (it doesn't have any) but from all other pages with PageTable children. So it's more like this (without any working urls <?php $items = $pages->find("template=update-location, pt_map!='', sort=title"); $map = $modules->get('MarkupGoogleMap'); echo $map->render($items, 'pt_map', array( 'height' => '500px', 'useHoverBox' => true ) ); ?> Anyway, thanks for all the help. much appreciated. What I've done for the moment is to add a manual session redirect on my pagetable child page templates. <?php $session->redirect($page->parent->url); ?> It's probably not great for SEO reasons but it'll help me press ahead for the moment.
  11. Yes, I updated my post. I didn't want to create another post and monopolise the thread I don't really follow your instructions but that's me wrapping my head around this and not your instructions. basically, I didn't realise that url below could be the name of a field on my PageTable page. 'markerLinkField' => 'url' Based on this, you saying I can create a field called url and somewhow reference the parent page address in that? And by the way, the map I am referring to would be a map displaying ALL pins right across the site and not just pins associated with a single page.
  12. Typically a pin on a map will link to the source PW page. However, I have a Map which pulls in locations and those locations are child-pages generated via PageTable. In this case, I want the pin to link to each pins parent url instead of itself. I've discovered an option in Ryans module which seems to control the links attached to the pins I'm not sure how to apply it to the following <?php $items = $pages->find("template=update-location, pt_map!='', sort=title"); $map = $modules->get('MarkupGoogleMap'); echo $map->render($items, 'pt_map', array( 'height' => '500px', 'markerLinkField' => 'url')); ?> I've tried these but obviously messing up my syntax or understanding of its workings <?php $link-to-parent = page->parent->url; //create a variable and then pass that to the markerlinkField $items = $pages->find("template=update-location, pt_map!='', sort=title"); $map = $modules->get('MarkupGoogleMap'); echo $map->render($items, 'pt_map', array( 'height' => '500px', 'markerLinkField' => ' . {$link-to-parent} .')); //call my variable here ?> <?php $items = $pages->find("template=update-location, pt_map!='', sort=title"); $map = $modules->get('MarkupGoogleMap'); echo $map->render($items, 'pt_map', array( 'height' => '500px', 'markerLinkField' => 'url->parent')); //try adding a reference to the parent ?> Can anyone point me in the right direction?
  13. I think this is from hitting Publish on a PageTable page but then not hitting Save on the same. Or something like this.
  14. Pages are being automatically created as children of the parent page.
  15. Thanks Bernhard. That does indeed look cleaner. Im not sure why but this method doesn't always show my most recent pin. Whereas the longer code will. When I look at my parent page and scroll to the PageTable field, I have a notice saying: Once I check the box beside the missing page, the pin will show on a map using your code.
  16. Got it. I needed to do this <?php // outputs multiple pointers from pagetable maps(pt_map) $items = $page->children("pt_map!='',"); $map = $modules->get('MarkupGoogleMap'); echo $map->render($items, 'pt_map'); ?>
  17. Can't quite get this to work with Page Table though. Each PageTable instance is a separate child page, right? So if this works for repeater maps and assigns a map called incident_location with those pins, echo $map->render($page->test_map_repeater, 'incident_location'); how would I generate a map containing a pin for each pageTable?
  18. Hi @zilli You can add as many images as you want to an image field in PW. This is assuming your images field hasn't been set to max 1 when setting up the image field. If I have a PW page that requires several images, they're all dropped into my General Images field. Then, in CK editor, I choose which ones I want to manually output in my Body field. If we're working with templates and you want to iterate through several images and echo them onto a page (for example, a gallery) , you can do that easily. Can you give us a use-case? There is so much flexibility here, you can work in a number of ways with images.
  19. That's nice. Although I like the simplicity of Repeater, using PageTable instead means extra fields can be associated with each pins tooltip. IE I could have a Summary field and that could display on mouse-over of each locations pin.
  20. Solved it. I just needed to update this: echo $map->render($page, 'incident_location'); to this echo $map->render($page->test_map_repeater, 'incident_location'); Seems obvious now :-/
  21. Just updating my request with a visual. You can see this page refers to three locations and thats what I need to output on a single map. I'm thinking it might be the way to go. In the meantime, I created a repeater field based on the MapMarker field and in the Admin, this works well as I can pinpoint a single address for each of my three locations. In the back end, I'd have a few separate maps per individual page but that's ok. On my front though, I want my single map to display those three addresses. This is what I've been using to display a map for a single location <?php foreach($page->test_map_repeater as $map); $map = $modules->get('MarkupGoogleMap'); echo $map->render($page, 'incident_location'); ?> I'm not sure how to isolate the address from each individual repeater map and pass it to the single MarkupGoogleMap above. I know my repeater map addresses have a value as they output when I try a simple echo such as <?php foreach($page->test_map_repeater as $mapinstance) { echo "{$mapinstance->incident_location->address}<br/>"; } ?>
  22. Trying MapMarker for the first time and really love it. Is there a way for me to specify multiple addresses in a single Map field in the back end? I know on the front end, I can probably setup pages and repeaters and pull those into a map on the front end but thats not what my project requires.
  23. There's plenty of great form tutorials on the web if you'd like to try building your own PHP form. Make sure you also look at the Form module which Ryan built and makes it real sime to create forms, collect results and notify recipients etc https://processwire.com/talk/store/product/2-form-builder-single/
  24. Might be worth a shot. Only issue is my client is a professional services firm and prone to pasting all sorts of crud into text fields.
  25. No joy Adrian. I added those lines to the Extra Allowed Content field. Having Googled the CK Editor forums, it does seem like it should have worked.
×
×
  • Create New...