How to add category description in directory view?

More
14 years 8 months ago #4087 by p.meertens
Hi,

Is it possible to show the category description in the directory view as well?

I've been playing arround with the default_categories.php and was able, with help yopyop001 to display the Category images.

But now i'm stuck!

Does anybody have a hint?

Kind regards,
Perry

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #4465 by joomlaanalyst
Hi p.meertens@12move.nl ,
Its simple.
1)Login to your administrator back-end of your site.
2)Select FLEXIcontent under components.
3)Click on category in FLEXIcontent Dashboard
4) Click on category you want to edit, and type your description in the editor and save to submit your changes.

Refresh your front page to see results.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #4559 by p.meertens
Hi joomlaanalyst,

I must have asked my question wrong. But anyway thank you for the response and the effort. What i want to do is have a list of my subcategories using the directory menu. It look something like this:

Sub Category1 image - Sub Category1 name - Sub Category1 description
Sub Category2 image - Sub Category2 name - Sub Category2 description
Sub Category3 image - Sub Category3 name - Sub Category3 description
Sub Category4 image - Sub Category4 name - Sub Category4 description


I am able to do show the image and name,changing the default_categories.php into:

<div class="floattext">


<h3 class="flexicontent cat<?php echo $sub->id; ?>">
<a href="<?php echo JRoute::_( FlexicontentHelperRoute::getCategoryRoute($sub->slug) ); ?>">

<?php echo JHTML::_('image.site', $sub->image, 'images/stories/', NULL, NULL, $sub->title); ?>

<FONT COLOR="#A80000"> <?php echo $this->escape($sub->title); ?> </FONT>

<?php if ($this->params->get('showassignated')) : ?>
<span class="small"><?php echo $sub->assigneditems != null ? '('.$sub->assigneditems.')' : '(0)'; ?></span>
<?php endif; ?>

</h3>

<ul class="catdets cat<?php echo $sub->id; ?>">
<?php
foreach ($sub->subcats as $subcat) :? >
<li>
<?php echo $this->escape($subcat->title); ?>
<?php if ($this->params->get('showassignated')) : ?>
<span class="small"><?php echo $subcat->assignedsubitems != null ? '('.$subcat->assignedsubitems.'/'.$subcat->assignedcats.')' : '(0/'.$subcat->assignedcats.')'; ?></span>
<?php endif; ?><?php echo JHTML::_('image.site', $subcat->image, 'images/stories/', NULL, NULL, $subcat->title); ?>
</li>
<?php
endforeach; ?>
</ul>
</div>



Now i would like to know how i can display the category description (what, in my case is only 1 sentence).

Anyone a guess

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #6288 by Jay
i need help in this matter too
appreciate is someone can point the direction

tks.

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #6296 by Rehne
Perhaps the code will help

<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo $this->category->description; ?>
<?php endif; ?>

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #6332 by Jay

Rehne wrote: Perhaps the code will help

<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo $this->category->description; ?>
<?php endif; ?>



tks bro Rehne,

I am loking for the full desc inside the content box to be displayed in the directorytemplate.

many thanks again.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.447 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline