Making Filtered category view cacheable

More
13 years 1 month ago #19707 by ViveLeFlexicontent

ggppdk wrote: We have same issue with fiters ??? ... as we had with alpha index (which is now fixed)

It's not an issue, just would be sweet if the filter options were cachable.

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

More
13 years 1 month ago #19716 by ggppdk
mmm, combinations of filters becomes too large too quickly (e.g. 10options*100options*27options etc) plus it would have to be different per user since guest and each logged user may have different access right (FLEXIaccess or joomla 1.7 ACL)

moreover the implementation would have to change to use joomla function level caching, anyway maybe it would be better for you site to enable query caching at the mysql server

... OR ...

Joomla full page caching (Joomla cache plugin) does not cache POSTed forms, and our filtering form is POSTed,

so maybe the best would be to convert our filtering form from using POST method to using GET method (GET method utilizes the url), thus we could enable joomla full page caching ...

NOTE that the last solution will only benefit guests not logged users, since Joomla full page caching is bypassed for logged users

anyway you can try this , go to your template file category_items.php and change method from 'post' to 'get' and then enable joomla full page caching plugin (note you may have issues with some extensions particularily with plugins, since they will be executed on when a page' cache data is first created)
<form action="<?php echo $this->action; ?>" method="post" id="adminForm">


-- 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
13 years 1 month ago - 12 years 10 months ago #19749 by ViveLeFlexicontent
tadaaa cachable filter, omg lol, so simple, but so important.. thank you so much ggppdk :mrgreen:
and yeah I use jotcache. Had no idea it worked like that..
All I need now is to change the url output of the filter option from
Code:
?filter_19=value1&option=com_flexicontent&filter_order=i.title&filter_order_Dir=&view=category&letter=&task=&id=426
to just the filter's value, so the name of the selected filter option.
Cause I tried to create a sef url from this long string, but it won't let me cause it doesn't start with index.php
Sorry to hijack this thread btw.. :oops: Maybe best to move it into a new topic?
Last edit: 12 years 10 months ago by ViveLeFlexicontent.

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

More
13 years 1 month ago #19761 by ggppdk
mmm, create a SEF link? the action link of the form is already SEF

-- you don't need and cann't make it SEF again
-- now about including the filters in this SEF url, this can not be done by using PHP, since the form is submitted by browser javascript, PHP is available when page is created at the WEB server (there you have URL ending as index.php and if you had the filter values too then you could make it SEF all of it, but you have them only after user submits).

Maybe you could create a SEF link by changing the form method back to POST method and then at the browser you could append each filter at the form's ACTION using javascript like this:
/var1name/var1value/

but i am not sure if this link will be handled properly by joomla's / FLEXIcontent reverse routing that reconstructs the original URL.

FINALLY, maybe
1. it is better to leave the method POST
2. don't try to include filters in a SEF link
3. instead just append them to the URL, for this code check out how it is done in category_alpha.php (there the letter is appended) but you will need to know javascript to do it

Regards


-- 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 months ago #21128 by ggppdk
This is fixed in r1035 plus:
-- filters are combined properly with search and alpha-index,
-- reset button will reset all form
-- added field labels for the filters


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

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