[RESOLU]separer Lire la suite de artChapo

DudyDudy Member
juillet 2015 modifié dans Modifications
Bonjour

j'aimerais pouvoir afficher les articles dans cette maniéré
article.jpg

image en tête
titre de l'article
author date et commentaires
classé et mot clé
Lire l'article
le problème est que je n'arrive pas à comprendre comment je puisse avoir ce résultat puisque le tout est dans artChapo

si il y a une idée je prend volontiers

merci beaucoup

Réponses

  • StéphaneStéphane Member, Former PluXml Project Manager
    			<?php while($plxShow->plxMotor->plxRecord_arts->loop()): ?>
    
    			<article class="article" role="article" id="post-<?php echo $plxShow->artId(); ?>">
    
    				<header>
    					<h1><?php $plxShow->artTitle('link'); ?></h1>
    				</header>
    
    				<section>
    					<?php $plxShow->artChapo(''); ?>
    				</section>
    
    				<footer>
    					<p>
    						<small>
    							<?php $plxShow->lang('WRITTEN_BY'); ?> <?php $plxShow->artAuthor() ?> -
    							<time datetime="<?php $plxShow->artDate('#num_year(4)-#num_month-#num_day'); ?>"><?php $plxShow->artDate('#num_day #month #num_year(4)'); ?></time> -
    							<?php $plxShow->artNbCom(); ?>
    						</small>				
    					<p>
    					<p>
    						<small>
    							<?php $plxShow->lang('CLASSIFIED_IN') ?> : <?php $plxShow->artCat() ?> - 
    							<?php $plxShow->lang('TAGS') ?> : <?php $plxShow->artTags() ?>
    						</small>
    					</p>
    					<?php $plxShow->artReadMore() ?>
    				</footer>
    
    			</article>
    
    			<?php endwhile; ?>
    

    Ce qui change

    1) Pour ne pas afficher le lien "Lire la suite" avec le chapo (paramètre vide passé dans l'appel de la méthode)
    <?php $plxShow->artChapo(''); ?>			
    
    2) Utilisation de la fonction artreadMore pour afficher le lien "Lire la suite" où on veut
    <?php $plxShow->artReadMore() ?>
    
    3) Pour pouvoir avoir une image au dessus du titre, il y a le plugin "vignette" qui permet faire ça en ajoutant une image d'illustration aux articles
    http://forum.pluxml.org/viewtopic.php?id=3626

    Enjoy! :)

    Consultant PluXml

    Ancien responsable du projet (2010 à 2018)

  • Merci Stephane
    je ne connaissais pas la function artReadMore

    pour le plugin il nest pas a jour avec la 5.4 mais je vais faire autrement

    grace a toi mes themes Pluxml commence a prendre forme, je me rejouis de partager

    ;)
Connectez-vous ou Inscrivez-vous pour répondre.