Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Steven

    (@shazahm1hotmailcom)

    Apologies for the delay in my reply! I missed your post.

    The screenshot is really fuzzy and hard to see. Can you please share a new one? Please ensure the screenshot shows the full path and not just the files.

    Meanwhile; I’ll test that the card-organization.php file is still being loaded like it should and will report back asap.

    Plugin Author Steven

    (@shazahm1hotmailcom)

    I’ve confirmed that the template override file is being loaded like it should on my dev/test site.

    Follow these steps to test:

    1. Navigate to the Connections Settings admin page and click the Advanced tab.
    2. Scroll to the Permalinks section.
    3. Enable the Organization option and save the change.
    4. Add a new “Individual” entry type and enter “Test Org” into the “Organization” field and save the entry.
    5. Navigate to this entry on the site’s frontend on your directory page.
    6. The “Test Org” should be a link; click it.
    7. The directory should now be filtered by “Test Org” and be displayed via the card-organization.php template override file.

    I hope this helps; please let me know.

    Thread Starter boltgroupllc

    (@mevinsconsulting)

    I think I see where the confusion is – is the card-organization.php file is only for a single listing? I was trying to use it for a full directory of organizations, rather than for single listings.

    Here is the directory list of individuals:
    https://www.crystalfallsgirlscouts.org/service-unit-leadership-team/

    Here is the directory list of organizations:
    https://www.crystalfallsgirlscouts.org/join-girl-scouts/

    We don’t use the single entry view, so I was trying to make these 2 views formatted differently. It doesn’t sound like that’s the intent of the card-organization.php file.

    Am I on the right path?

    Plugin Author Steven

    (@shazahm1hotmailcom)

    RE: is the card-organization.php file is only for a single listing?

    No, I’ll try to explain better. Let’s say you have added 6 Individuals. You add “My Company” to the Organization field for each individual. Then, add another 9 Individuals and enter “Their Company” in the Organization field.

    No, on the site frontend, you can view all 15 entries, or you can view only the 6 with “My Company” or the 9 with “Their Company” with the following links on your site:

    • your-site.com/directory-homepage/organization/My Company
    • your-site.com/directory-homepage/organization/Their Company

    When filtering the results like this, the card-organization.php template file is to display the entries.

    Is this clear and makes sense?

    Am I on the right path?

    Sort of.

    Create a card.php override file since you are not using the single view.

    Reduce the code in this file to just this:

    <?php 
    switch ( $entry->getEntryType() ) {
    	
    	case 'individual':
    		include 'individual.php';
    		break;
    		
    	case 'organization':
    		include 'organization.php';
    		break;
    		
    	default:
    		include 'original.php';
    }

    The contents of the original.php will be the code original found in the card.php file.

    The same is true for ‘individual.php’ and ‘organization.php’ except for the changes you want to make.

    I hope this helps; please let me know.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Card Template File for Orgs’ is closed to new replies.