Hello,
First of all, I just wanted to commend your work on this plugin. It is the single most useful tool I use for building really dynamic sites with EE.
I am having an issue with deeply nested sections in Switchee, and I’m curious if I’m approaching this the wrong way.
Here is an example of the code:
{exp:switchee variable="{segment_2}" parse="inward"}
{case value=""} default root page (/live) {/case}
{case default="Yes"} {switchee variable="{segment_2}" parse="inward"} {case value="{segment_2_category_url_title}"} {switchee variable="{segment_3}" parse="inward"} {/switchee} {/case} {case value="events"} {switchee variable="{segment_3}" parse="inward"} {case value=""} {/case} {case default="yes"} {if switchee_no_results}{redirect="live"}{/if} {/case} {/switchee} {/case} {case value="online"} {switchee variable="{segment_3}" parse="inward"} {case value=""} live/online {/case} {case value="games"} live/online/games {/case} {case value="{segment_3_category_url_title}"} {switchee variable="{segment_4}" parse="inward"} {case value=""} live/online/category {/case} {case value="#^P(\\d+)$#|''"} live/online/category/item {/case} {case default="yes"} {if switchee_no_results}{redirect="live"}{/if} {/case} {/switchee} {/case} {case default="yes"} {if switchee_no_results}{redirect="live"}{/if} {/case} {/switchee} {/case}
{case default="yes"} {if switchee_no_results}{redirect="live"}{/if} {/case} {/switchee} {/case} {/exp:switchee}
Now overall this works well, but once we’re on the live/online/games pages, and the subsequent categories, the exp:channel:categories tag is throwing out two PHP warnings with the following:
Message: preg_replace(): Unknown modifier ‘\’
Message: Cannot modify header information - headers already sent
Everything functions and the categories are being listed, yet the PHP warnings persist.
Does anyone have any input on this, or perhaps a different approach I could take?
|