I'd like to setup the following scenario:
I installed an embeded blog in an existing site and I want to split it up into two sections.
With the "Start Page Category" plugin I set my initial view category to cat1 and I hide cat2, which works perfectly.
I access my second section by a hardcoded link directly to blog/categories/2-cat2.
cat2 uses a different template and it works excellent so far.
Now comes the problem: I have my navigation links in a smarty-template file called navigation.tpl. Every site passes a variable to that file which contains if-statements like {if $nav=="xy"} class="active"{/if}. This is for highlighting the corresponding navigation link.
If I define $nav=cat1; in my index.php of serendipity and then choose my second blog section it shows up the correcht section but it highlights still the link cat1 instead of cat2.
I did some stuff like:
if (strstr($_SERVER['REQUEST_URI'],'/cat2/') OR $_SERVER['REQUEST_URI'] == "/blog/categories/2-cat2")
{$nav="cat2";}
else
{$nav="cat1";}
that works so far, but when I open a single entry the url is like 12-titlehere.html. I don't have chance to "read" the correct category from the url now.
Now I installed the "Custom Permalinks for Entries" plugin and gave all the cat2 entries a link like /blog/cat2/12-titlehere.html. cat2 is in my url now and I am able to determine which link has to be highlighted, but now occurs another problem: serendipity doesn't brings up the assigned skin but it brings up the default one for cat1. It seems that serendipity can't determine the category when the permalink-plugin is in use.
This two plugins seems to be incompatible.
I have two ideas how to solve my problem:
a) have the permalink-plugin disabled but rewrite the url of an entry to contain it's category name. Unfortunatly I just have %id%, %realname%, %username%, %email% as options and I would need something like %category%
b) use the permalink-plugin and make it compatible with the "theme-assign" plugin.
Has anybody a solution for my problem?
I hope my post isn't too complicated
I look forward to a response and thank you in advance!
Best regards,
tropfstein