Forum Replies Created

Viewing 15 replies - 46 through 60 (of 62 total)
  • Thread Starter mygrove

    (@mygrove)

    I am still trying to get this “orderby” to work with a pair of related Pods, in my case Book and BookAuthor. This must have been done before, so could we have an example of how exactly to set it up. I have simplified it down to these two Pods with a minimum of custom fields. I think the problem is it is not clear what should go in the two two pod templates.

    Thanks.

    Thread Starter mygrove

    (@mygrove)

    It’s the content of the “YOUR LOOP TEMPLATE” I think I cannot get right and how to link it to the related template.

    Pod = “Book”
    Custom fields: publication_date, publicaton_place, related_bookauthor

    Pod = “BookAuthor”
    Custom fields: date_of_Birth, date of death, related_book

    e.g. for a book title to be looped in the bookauthor:

    Pods template for Pod “book”: “YOUR LOOP TEMPLATE”
    {@post_title} {@publication_date} {@publicaton_place}

    Pods template for Pod “bookauthor”:
    [each related_book]

    • [pods name=”bookauthor” where=”related_book.meta_value = ‘{@id}'” orderby=”@publication_date” template=”YOUR LOOP TEMPLATE”]
    • [/each]

      N.B. I found that WP will not allow “Author” as a Pod name.

      Thanks

    Thread Starter mygrove

    (@mygrove)

    Thanks.

    What does the “YOUR LOOP TEMPLATE” actually contain in the Books / Author example?

    Thread Starter mygrove

    (@mygrove)

    That’s it. Thanks.

    Thread Starter mygrove

    (@mygrove)

    I am happy with the structure now.

    What I cannot find is how to get fields from the Places pod into a Pod Template to use in the Person pod.

    The fields appear in the Pod Reference list when configuring the template, but they are blank when viewing actual Person post.

    The two link fields are set up bidirectional in each Pod.

    Thanks

    Thread Starter mygrove

    (@mygrove)

    Hi,

    There is a many-to-many relationship between People and Places, but each of the links needs to hold information relating to that specific link i.e. the start_date and end_date.

    Yes, you can link People and Places many-to-many but then there is nowhere to hold that additional information.

    Ultimately I want to be able to query People and show all the Places associated with them with the data from the Appointment. Also to be able to do the reverse and query all the Places and show all People that have ever been linked to that Place (in start_date order!)

    Thanks.

    Thread Starter mygrove

    (@mygrove)

    That’s working again. Thanks.

    Thread Starter mygrove

    (@mygrove)

    Happy to help!

    Thread Starter mygrove

    (@mygrove)

    Thread Starter mygrove

    (@mygrove)

    Lots of errors:

    Loading failed for the <script> with source “https://www.edintone.com/blog/blog/wp-content/plugins/seraphinite-post-docx-source/Cmn/Cmn.js?pk=Base&ver=2.5.1”. post-new.php:2272:1
    Loading failed for the <script> with source “https://www.edintone.com/blog/blog/wp-content/plugins/seraphinite-post-docx-source/Cmn/Gen.js?pk=Base&ver=2.5.1”. post-new.php:2284:1
    Loading failed for the <script> with source “https://www.edintone.com/blog/blog/wp-content/plugins/seraphinite-post-docx-source/Cmn/Ui.js?pk=Base&ver=2.5.1”. post-new.php:2285:1
    Loading failed for the <script> with source “https://www.edintone.com/blog/blog/wp-content/plugins/seraphinite-post-docx-source/Cmn/Net.js?pk=Base&ver=2.5.1”. post-new.php:2286:1
    Loading failed for the <script> with source “https://www.edintone.com/blog/blog/wp-content/plugins/seraphinite-post-docx-source/editor.js?pk=Base&ver=2.5.1”. post-new.php:2298:1
    ReferenceError: seraph_pds is not defined
    post-new.php:2275:764
    MouseEvent.mozPressure is deprecated. Use PointerEvent.pressure instead.

    Thread Starter mygrove

    (@mygrove)

    What do you need, part of the docx file?

    Thread Starter mygrove

    (@mygrove)

    Does it take awhile for Google to find the pdfs, I’ve had some in place for about 3 months but they don’t show up yet.

    Thread Starter mygrove

    (@mygrove)

    Perfect. Thank you.

    Even this variation works too:

    [bg_collapse view=”link” color=”#4a4949″ expand_text=”Level 1″ collapse_text=”Level 1″ ]
    [bg_collapse_level2 view=”link” color=”#4a4949″ expand_text=”Level 2a” collapse_text=”Level 2a” ]
    Detail 2a
    Detail 2a[/bg_collapse_level2]
    [bg_collapse_level2 view=”link” color=”#4a4949″ expand_text=”Level 2b” collapse_text=”Level 2b” ]
    Detail 2b
    Detail 2b[/bg_collapse_level2][/bg_collapse]

    Thread Starter mygrove

    (@mygrove)

    I can confirm version 1.4 – passing the query works for me. Thank you.

    Thread Starter mygrove

    (@mygrove)

    Apologies for posting here my solution outside of Auto-iframe, but in case anyone else needs to do this.

    First step was to revert to the standard iframe but adding a little php, using a plugin “Code snippets”.

    <iframe id="table-iframe" src=https://www.example.com/search.pl?&<?php echo $_SERVER['QUERY_STRING']; ?> style="margin:0; width:100%; height:150px; border:none; overflow:hidden;" scrolling="no" onload="AdjustIframeHeightOnLoad()"></iframe>

    $_SERVER['QUERY_STRING'] brings the query string from the parent page.

    "AdjustIframeHeightOnLoad()" is described in the link below

    Then I was left without the key function of Auto-iframe – automatically adjusting the height to iframe contents.

    The approach described here simply involved adding a little Javascript via the “Code snippets” plugin again, into the page with the iframe and after the iframe is loaded.

    <script type="text/javascript">
    function AdjustIframeHeightOnLoad() { document.getElementById("table-iframe").style.height = document.getElementById("table-iframe").contentWindow.document.body.scrollHeight + "px"; }
    function AdjustIframeHeight(i) { document.getElementById("table-iframe").style.height = parseInt(i) + "px"; }
    </script>

    The iframe id=”table-iframe” is key to linking the two parts together.

    Interested if anyone has a better solution, particularly if the Auto-iframe plugin could be enhanced as suggested.

    • This reply was modified 8 years ago by mygrove.
Viewing 15 replies - 46 through 60 (of 62 total)