Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slug-Archiv-Darstellung nicht vorhanden und daher Rückfall auf das Theme problematisch #112

Open
xwolfde opened this issue Nov 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@xwolfde
Copy link
Member

xwolfde commented Nov 29, 2024

Wenn man den Slug ohne Endpoint aufruft, erfolgt, sofern man nichts im Plugin definiert hat, die archive.php-Darstellung des jeweiligen THemes. Wenn archive.php im jeweiligen Theme nicht existiert, dann erscheint die post.php Darstellung. etc.

Diese erscheint mir hier aber problematisch, da dort nun im FAU Theme, mangels nicht vorhandenen Excerpt bei den Post Types, der komplette Post Inhalt dargestellt wird von den Personen.
Wenn die Personeneinträge lange Inhalte haben, wird die Archive-Liste also sehr lang und unübersichtlich.

Bei dem alten FAU Person wurde hierzu eine archive-person-fau-theme.php bzw archive-person.php template abgelegt.
vgl. https://github.com/RRZE-Webteam/fau-person/tree/master/includes/Templates

bei der Einzeldarstellung des jew. Post Types wurden dann die Ausgabe des Shortcodes für den format kompakt ausgegeben:

 <?php while (have_posts()) {
                            the_post();
                            $id = $post->ID;
                            if ($id) {
                                echo FAU_Person\Shortcodes\Kontakt::shortcode_kontakt(array("id" => $post->ID, 'format' => 'kompakt', 'showlink' => 0, 'showlist' => 1));
                            } else { ?>
                                <div class="alert">
                                    <p>
                                    <strong><?php _e('Es tut uns leid.', 'fau-person'); ?></strong><br>
                                    <?php _e('Für den angegebenen Kontakt können keine Informationen abgerufen werden.', 'fau-person'); ?>
                                    </p>
                                </div>
                                <?php
                            }
                        } ?> 
@xwolfde xwolfde added the enhancement New feature or request label Nov 29, 2024
@xwolfde xwolfde added this to the V2.2 - Finetuning II milestone Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant