Category Title Location

More
12 years 6 months ago #38435 by mikeg1
Replied by mikeg1 on topic Category Title Location
One other quick question on something else... if you go to this page: webworxapp.com/scca you see the main picture... it is supposed to be 660x371... but if you inspect the element - say with Chrome Inspect Element tool - you can see it's not that size. In the category's settings... I have it set to Image Width: 660 and Height 371... and processing method... scale... I also have used crop before as well. The image is extract from main text, position is left... using parameters. Layout is Blog. This is for the leading article, although all the images that are generated from Flexi Content code seem to have this. Thanks

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

More
12 years 6 months ago #38437 by ggppdk
Replied by ggppdk on topic Category Title Location
Hello,

*** In short
1. Disable the parameter that prints category description
(e.g. in your Joomla Menu item and please enable parameter override otherwise the menu parameters are not used, or if you do not do a category parameters override in menu item then do it at category configuration)
2. place the code:
Code:
<h2 class="cattitle"> <?php echo $this->escape($this->category->title); ?> </h2>
at the desired place of your category_items.php
(simply place it in some place and then make some web page refreshes moving the code, and you will easily find where the image of leading items is outputted)


*** In long
use this to find other stuff that you need):
and i do this everyday, on FLEXIcontent and to Joomla and for many other Joomla extensions (even to debug extension unknown to me),
i even do this to answer question on forum


1. make a local copy of your site (i mean, if you do not have one already)

2. examine your page with firebug (firefox) or with chrome inspector and e.g. you see that the category title is inside an <h2> and has a CSS class "cattitle"

3. do a text search for "cattitle" e.g. make it case-sensitive and "whole word"-search

4. you find e.g. 4 places with it appearing, then adding some text output in these places you make sure which place it is actually outputting your page (you refresh your page of course)

5. you undo text output changes and you have found that the category title is outputted by
components/com_flexicontent/tmpl_common/category_category.html

6. If you place an
echo "<pre>"; print_debug_backtrace(); echo "</pre>";
inside the code, you will see that this file is called by
components/com_flexicontent/templates/myteplate/tmpl_common/category_category.php
(this might know already by reading our FAQ:
www.flexicontent.org/documentati ... cture.html )
so you may copy the code in your FLEXIcontent template to customize it

7. If you do a text search for 'show_cat_title' in *.xml files, you find XML files that use language string 'FLEXI_SHOW_CAT_TITLE'

8. If you do text search for 'FLEXI_SHOW_CAT_TITLE' in *.ini file, you find e.g. in english ini file of FLEXIcontent component:
FLEXI_SHOW_CAT_TITLE="Show category title"
so now you know which parameter to disable (ok, you do not need the above but you might need it in other cases)

9. now you also have the code that you want to copy:
Code:
<h2 class="cattitle"> <?php echo $this->escape($this->category->title); ?> </h2>
into category_items.php


***************************************
About image size,
- this is normal when scaling, i mean the image is scaled but it will not be stressed to fit both dimensions, just one dimension will be reached
- about cropping this should give the desired size if both sizes are bigger than your thumbnail sizes, if you enable crop method for leading images you should see a &zc=1 appear in the URL of the image, did it not appear ? maybe clear cache, otherwise it is a bug or you edited wrong parameter of blog template?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

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