Reproducing "blog style" and List style" category views

More
12 years 9 hours ago #31068 by Rehne
Hi,

ggppdk wrote: ... OR even create a NEW ONE mycustom.css and load it in you Joomla template
...


a good way to do that is ... create com_flexicontent.css ... and use the following code
Code:
<?php if (file_exists(JPATH_SITE.DS."templates".DS.$this->template.DS."css".DS.$option.".css")):?> <link href="/<?php echo $this->baseurl ?>/templates/<?php echo($this->template);?>/css/<?php echo($option);?>.css" rel="stylesheet" type="text/css" /> <?php endif;?>

in this way, you can created a new css (override) file for each component and this is only loaded when it's needed (component is active).

Explanation of code:
The first line in the code is a PHP if statement which check to see if the CSS file exists for the component which currently being used.
If it exists, the second line loads that (override) CSS file. The naming convention for the CSS files always included com_ so you end up creating files with names such as com_flexicontent.css


Regards

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

More
12 years 8 hours ago #31071 by ggppdk
Good idea Rehne,

and this file should be editable in FLEXIcontent Global configuration via a parameter of

file form field TYPE


-- 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...

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

More
12 years 11 minutes ago #31090 by conticreative
Thank you guys. Especially for the code to sort the table. I'll test it tomorrow when I get back to work.

As far as the CSS file, thank you for the code to create the override, that will come in handy.

However, so far what I have been doing has been to override the code I found in flexicontent.css in the flexi template css file and it works quite nicely.

Just to make it clear, when I create a new template in flexicontent, each item or category page has its own css . I have been going on the assumption that any rule I place in those css files will override the flexicontent.css file. If it doesn't I simply (as you suggested) make the rule more specific.

So far, I haven't needed to change any css that does not act upon one of the templates. I am sure there may be a need to do that eventually, and in that case I'll use the trick you posted here.

Thank you again.

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

More
12 years 8 minutes ago #31091 by conticreative

ggppdk wrote: Good idea Rehne,

and this file should be editable in FLEXIcontent Global configuration via a parameter of

file form field TYPE


Upon reading this post again I realized I am not sure what it is referring to.

Also, any idea about sorting the articles in the table like the default Joomla list style category page does?

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

More
11 years 11 months ago #31092 by Rehne

conticreative wrote: Also, any idea about sorting the articles in the table like the default Joomla list style category page does?


Hi,
currently it is not yet implemented (maybe in the future)
but you can use jqeury Plugins
i recommend 'Tablesorter'
it is very easy to use
tablesorter.com/docs/ or other plugins/methods ...
www.lampdev.net/programming/php/json-ajax-jquery.html

but you have to adapt the used FC template (table...)
but that is not very complicated

Note:
following the tablesorter.com/docs use best
Code:
jQuery(document).ready(function($){ jQuery.noConflict(); $("#myTable").tablesorter( {sortList: [[0,0], [1,0]]} ); );
This "noconflict" causes that there are no problems with mootools which are integrated into joomla.


Regards

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

More
11 years 11 months ago #31093 by conticreative
Thank you. I was actually looking at using jQuery, but I wasn't sure if there was already something built in I could use.

Much obliged.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.429 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