J2.5 Flexi and new plugin

More
12 years 3 months ago #28167 by tevez15
Hello

I created a new plugin, where three js call, using the $ document-> addScript
and the settings of the plugin with $ document-> addScriptDeclaration ($ super_script);

The problem is that the flexi makes me a render, and read these files twice, do not know how or why ..

thank you

PS: Done, in configuration, by default, Flexicontent have in "Always create field HTML: Only in the item view", i change to "Only when needed".

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

More
12 years 3 months ago #28174 by ggppdk
Replied by ggppdk on topic J2.5 Flexi and new plugin
If you have 2 fields of typeK e.g. imagea and imageb, then the code will be called twice for a single item

If it is category view it will be called e.g. 8 times if you display 4 items, each of the having imagea, imageb

You could check and
-- create unique CSS for each field by appending to the class names the variables $item->id, $field->id

And you should check and add to the any Javiscript files only once:

e.g. see minigallery.php on how to do it


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