I have the following code:
if (isset($this->request->get['filter'])) {
$filter = $this->request->get['filter'];
} else {
$filter = '';
}
I want to replace it with:
if (isset($this->request->get['attribute'])) {
$filter = $this->request->get['attribute'];
} else {
$filter = '';
}
I have tried the following in vQmod folder:
<operation info="After filter request, add attribute request">
<search position="Replace"><![CDATA[
if (isset($this->request->get['filter'])) {
]]></search>
<add><![CDATA[
if (isset($this->request->get['attribute'])) {
$filter = $this->request->get['attribute'];
}
]]></add>
</operation>
I checked the vQmod log files and am getting the error: SEARCH NOT FOUND
Can anyone help me to tell me what I have to use in if
statement replacement.
i tried to use
offset
into my search attribute like<search position="Replace" offset="2">
but it produce some other error so i decide to use single line search like the following :Hope it helps someone else like me