[SOLVED] Templating : modify $this->items

More
10 years 3 months ago - 9 years 8 months ago #52906 by juansolos
Hello,
i have a category view with articles.

I want articles displayed have a different value for the fieldX.

So in my categoryitem.php, i transform "$this->items" in a new $this->items.
That work as expected.

But of course my filter total results are not correct.

So my question is :
Where can i transform my $this->items array on the top of files?

In this way, the new $this->items array will be use by all files.

I hope i am clear.

Regards
Last edit: 9 years 8 months ago by ggppdk.

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

More
10 years 3 months ago #52926 by ggppdk
Hello

inside the template, you are examining
$this->items

so that you exclude / skip some of them,


-- no you cannot alter the filters these are based on the SQL query that created the original
$this->items


-- 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
10 years 3 months ago #52933 by juansolos
Thanks for the reply.
Yes i suppose that the filter use the sql query.

So the better way is to change the query;)

I imagine there is no way to override the query?

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

More
10 years 3 months ago #52957 by ggppdk
Hello

no, we would not allow it, since this would limit our changes in future versions


-- 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
10 years 3 months ago #52959 by juansolos
Ok.
So i think i should modifiy the query and add a "distinct fieldX" somewhere.

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

More
10 years 3 months ago #52978 by ggppdk
Hello

add query for a field ?


you can filter a category view

- via visible filters
- but you can also do via a category menu item,
1. enable parameter override
2. set a "locked" filter value in the filtering section (at the bottom of the TAB) (note the field must be TAGGED as 'filter' for this to work)
- the locked value can be single value, multiple or range

-- you can create a menu that comprises of menu items with locked filter values to achieve a "partitioning" of a category


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