How to add category description in directory view?

More
15 years 11 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
15 years 10 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
15 years 10 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
15 years 9 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
15 years 9 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
15 years 9 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.

More
15 years 5 months ago - 15 years 5 months ago #9306 by hossam abohassan
i think this is what i am searching for

where should i put this code


<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo $this->category->description; ?>
<?php endif; ?>
Last edit: 15 years 5 months ago by hossam abohassan.

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

More
15 years 5 months ago #9358 by yopyop001
Hi,

To add category description in the directory view :

You can add in com_flexicontent/views/flexicontent/tmpl/default_categories.php
Code:
<?php echo $sub->description; ?>

for example before
Code:
<ul class="catdets cat<?php echo $sub->id; ?>">

And to display subcategories description :

Add
Code:
<?php echo $subcat->description; ?>

between
Code:
<?php foreach ($sub->subcats as $subcat) :?>
And
Code:
<?php endforeach; ?>

Use Joomla overriding way to keep it when you will update FC.

BR

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

More
15 years 5 months ago #9370 by hossam abohassan
this worked well
thaaaaaaaaaaaaaaaaaaaaaanks yopyop001
:D :D :D :D :D :D

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

More
15 years 5 months ago #9412 by micker
hello
great news edit your post to [solved]
thanks

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

Moderators: vistamediajoomlacornerggppdk
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
Save