Post by DSGI » Mon Dec 08, 2014 4:16 am

Hello All -

Working on some OCmod files and running into a problem with the OCmod Offset and Index features. They are:

1) Does Index start at a 0 or 1 index? I'd assume 0, but when I put 0 as my index for example:

<search offset="0" limit="1"><![CDATA[<div class="row">]]></search>
<add position="before"><![CDATA[
<div class="row"><p>Test - Hello World!</p></div>
]]></add>

On the admin dashboard (there are 5 <div class="row"> tags) instead of adding the my new test div at the before the first <div class="row"> one time, it adds in in 5 times inside of each tag.

Does anyone know how the index and offset work in the new OCmod (before Daniel changed the OCmod I had it working correctly - but now I can't get it to work at all)?

Thanks!

DSGI

New member

Posts

Joined
Wed Feb 08, 2012 5:28 pm

Post by inactiveaccount9912 » Mon Dec 08, 2014 5:13 am

It starts from one the index, and offset I assume the same ,plus 0 for offset would make it useless(I think the fact that you set offset to 0 its why it adds it in the same line).And use index not limit (not sure how that works, but I belive is just for regex search).

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am
Who is online

Users browsing this forum: No registered users and 1 guest