Insert Module in content after x paragraphs

More
12 years 6 months ago #19708 by scorpion_pt
Hi,

I have created one category: ADS

Using Flexi Universal Module I chose content from that same category to display in items view at certain conditions defined by scope's.

I want the module content to be displayed after x paragraphs. Is this possible, by this way? Or other?

some help is appreciated ;)

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

More
12 years 6 months ago #19710 by igcorreia
I am also searching for that.
That is the category view correct?

for example:
for every 5 blog posts a template position is created.
[attachment=0:1qh1i1zf]<!-- ia0 -->advertise.jpg<!-- ia0 -->[/attachment:1qh1i1zf]

Is this it?
Attachments:

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

More
12 years 6 months ago #19740 by ggppdk
The simplest way to do this is to edit template file blog/category_items.php and put an "if" inside the 2 loops that displays the items (leading items (single column) and standard items (multiple columns) ).

This if (inside the 2 loops) will insert the code of a system plugin that loads a module.

Maybe like this:
Code:
$x=4; for ($i=0; $i<$leadnum; $i++) : ... if ( $i % $x == 0 && $i) { ... code of a system plugin that loads a module } ... } for ($i=0; $i<$leadnum; $i++) : ... if ( $i % $x == 0 && $i) { ... code of a system plugin that loads a module } ... } ... $x = $this->params->get('intro_cols', 2) * $x; for ($i=($this->limitstart == 0 ? $leadnum : 0 ); $i<$count; $i++) : ... if ( $i % $x == 0 && $i) { ... code of a system plugin that loads a module } ... endfor;

I did not test this but it should work, although it may need modifications

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 6 months ago #19743 by scorpion_pt
Tx ggppdk, ill try your solution and report my findings.

:)

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

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