Import FC outside/notoutside Joomla

More
12 years 4 months ago #27106 by ggppdk
The parameter is single item or array of items, and you don't need to use &, reference already exists in function definition.

So proper call is:

FlexicontentFields::getFields($item);

But you do not need to call getFields, it will be called ONCE by the first call of FlexicontentFields::getFieldDisplay()

Maybe use this:
$curr_view = JRequest::getVar('view');
JRequest::setVar('view', FLEXI_ITEMVIEW); // or 'category'
FlexicontentFields::getFieldDisplay($item, 'img_geral');
JRequest::setVar('view', $curr_view);

also do this (after calling getFieldDisplay):
echo @$item->onDemandFields[$fieldname]->errormsg;

to see there is some error message
(NOTE: onDemandFields property will be removed from next revision)


-- 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 4 months ago #27110 by igcorreia
Just a simple question:
When I duplicate views/category/views.html.php
and change the name to:
views/category/views.myhtml.php

It works perfect but in the item gives me CLASS ERROR,

so I duplicate views/item/views.html.php
and change the name to
views/item/views.myhtml.php

what is that error? is it simple to change?

this way I can configure my own view.
thanks

UPDATE: I have an error only in this line:
Code:
// Bind Fields //$item = FlexicontentFields::getFields($item, FLEXI_ITEMVIEW, $params, $aid); //$item = $item[0];

is the same error in the other example we are trying.

*sniff sniff spend an entire day on this.

UPDATE::
the problem is only line: 119 + 120

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

More
12 years 4 months ago #27115 by igcorreia
After a HUGE Struggle I manage to finalize it.

Had to create a new template in my template folder so I can use:

?tmpl=mytemplate this way I stay inside Joomla the I had to make an IF in the item -> view.html.php so I can validate if I am using the TMPL via GET the is so I force FC to use a different FC template after this I manage to use the regular $fields;

This saying I manage to intgrate dompdf exporter with FC.

Gave my trouble my we manage to do it :D Thanks again.

ps: yestarday problem I think it wat the only got the field for the category and not the item.

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

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