content plugin in the category display.

More
11 years 11 months ago #32180 by rottenberg
Hello,
I try to use a content plugin (admiror frame). this plugin add an elegant frame around what's you want.

No problem to use it for each field (I have activated content plugin in category view) for selected fields.

But I want to frame the complete article.

the syntax of the text is {AF}yourtext...{/AF}

In the category_item_html5.php template
I have added {FA} before each <li...> tag and {/FA} after each </li> tag.

the plugin is not interpreted.
Is it possible to use content plugins in this case ?


thank's for help
best regards
Michel

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

More
11 years 11 months ago #32181 by ggppdk
Hello,

-- Content plugins are not trigger globally like system plugins, they are trigger inside Joomla's article descriptions , and of course selectively in FC fields

Despite this being general Joomla related topic we have a FAQ article for exactly this:

Triggering Contents Plugins to create a customized layout of your fields, to e.g. Sliders or Tabs/ render a google maps plugin /etc

BUT you will need to capture all output in a variable
Code:
<?php ob_start(); ?> ... HTML and PHP code of your template <?php // done with the requested template; get the buffer and clear it. $captured_html = ob_get_contents(); ob_end_clean(); ?>

then use variable $captured_html as described in the FAQ article.

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
11 years 11 months ago #32183 by rottenberg
thank you very much

I'm modifying my template.
Just a question with the text of the FAQ :

Its written :
Code:
// STEP 3. Prepare other properties of the object c, so that it looks like a Joomla article object $c->title = $this->item->title; ... $c->state = $this->item->state; $c->state = $this->item->state;
Why is '$c->state = $this->item->state;' given twice ?
Isn't it another field than $c->state for the second line ?

best regards
Michel

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

More
11 years 11 months ago #32185 by ggppdk
Yes you do not need it twice

you can use :
Code:
$c->text = $captured_html; // We created above ... $c->title = $this->category->title; $c->slug = $this->category->slug; if (FLEXI_J16GE) $c->sectionid = 1; // for J1.5 only $c->catid = $this->category->id; $c->catslug = $this->category->slug; $c->id = $this->category->id; $c->state = $this->category->published;

-- test and correct,
-- the $c object is a fake item to be able to trigger Content plugins

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
11 years 11 months ago #32188 by rottenberg
thanks,
I have tried but didn't succeed. I think there were too much 'echo' to be changed.
And I dont't want to modify too much the template. I want to keep the original one.

So I won't continue to try using content plugin at the general level.

the admiror frame works with fields (I tested it in a text field).

I wanted to use it with images fields. But I saw there were no way to execute a content plugin with an image field.

Is it volontarily forbidden to use content plugin with images or is it only an oversight ?

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

More
11 years 11 months ago #32200 by ggppdk
Hello,
-- You do not modify template at ALL
you do not modify echo or any other command in the template !!

The commands i gave you, capture the output of echo into variable $captured_html

see code below more carefully , just place it start and end of HTML -and- PHP output statements that you want to capture:
Code:
<?php ob_start(); ?> ... HTML and PHP code of your template <?php // done with the requested template; get the buffer and clear it. $captured_html = ob_get_contents(); ob_end_clean(); ?>


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