Categories in home

Hello, i want to tell you that pluxml is amazing. I have some problems using this forum, i know a little french but i also use google translate for it.
Ok, my question is if i can in a way make categories to appear in the loop like them articles appear on my homepage. i really disn't found the code for that.
My site is www.parfait.ro if you are intersted to view the template.

Thanks

Réponses

  • StéphaneStéphane Member, Former PluXml Project Manager
    Hello deckool
    See categorie.php file in your theme folder.

    Consultant PluXml

    Ancien responsable du projet (2010 à 2018)

  • Thanks, i looked there but it looks like the home.
    What i want is to find what the shortscripts are for category to use them on the loop.
    I have this lines
    <?php while($plxShow->plxMotor->plxRecord_arts->loop()): ?>
    <h2><?php $plxShow->artTitle('link'); ?></h2>
    <div class="image"><div class="pcaption"><?php $plxShow->artTitle(); ?></div><img src="../script/timthumb.php?src=../data/images/<?php $plxShow->artTitle(); ?>/<?php echo rand(1,3);?>.jpg&a=c&h=120&w=690&zc=1" alt="">
    </div>

    <div class="art-chapo"><?php $plxShow->artChapo(); ?></div>

    there i want to change the plxRecord_arts with something to take them categories and recursively artTitle with catsTitle i guess and so on...

    I also looked in the core for what i have to put in there but i didn't figured it!

    Thanks
  • StéphaneStéphane Member, Former PluXml Project Manager
    I'm not sure to understand what you want.
    If you add this following line in the loop (in home.php) it will display the name of the category
    <?php $plxShow->artCat(); ?>
    

    Is it what you want to do ?

    Consultant PluXml

    Ancien responsable du projet (2010 à 2018)

  • Ok, so right now i made a hybrid with what i found on the sidebar.php.
    I paste the code it works just fine but the <?php echo rand(1,3);?> won't work!

    Here's the code - you also can see it live on my website.
    Anyway if it's another option to make this please tell me, or if u know how can i make the php rand to work inside that.(i like few rotating images)

    <?php $plxShow->catList('','<h2 id="#cat_id" class="#cat_status"><a href="#cat_url" title="#cat_name">#cat_name</a></h2>
    <div class="image"><div class="pcaption">#cat_name</div><img src="../script/timthumb.php?src=../data/images/#cat_name/1.jpg&a=c&h=120&w=690&zc=1" alt="">
    </div>
    '); ?>
  • actually not any php call won't work in that
Connectez-vous ou Inscrivez-vous pour répondre.