How to setup so wedget only shows in TheHomePage and not Default?

Topics: Administration, Core, Customizing Orchard, General, Writing themes
Dec 18, 2012 at 3:34 PM

Can someone out here help me with how this is done.

 

I want to add 1 logo to EVERY other page in my site, and 1 logo ONLY to home page ..

 

When I try to add the logo to default it applies to all pages including home page, when I try to apply logo to home page it only is in home page.. if I apply it to both home page and default.. then there are 2 logos in homepage.

 

I am not quite sure how the layer synthax is as far as rules etc..

but I want something that says EVERY OTHER PAGE but HOMEPAGE.

 

true and not (url ~/)

 

Can someone help ..

 

thanks

Developer
Dec 18, 2012 at 3:51 PM

You could create a new Layer called "NotTheHomePage" with the rule: "not (url ~/)". Now you can add your homepage logo to TheHomePage layer and your non-homepage logo to the NotTheHomePage layer. Done.

Dec 18, 2012 at 4:29 PM

not (url !/) is not a valid rule though.

Dec 18, 2012 at 4:37 PM

The rule sfmskywalker gave should be a valid rule.  We are using a similar rule in our production site to target all pages besides the Homepage and Search.  I'll copy the layer we are are using:

Name:  NotTheHomepage

Description:  Anything but the homepage

Layer Rule:  not url( '~/') and not url("~/Search*")

 

Hope that helps

Developer
Dec 18, 2012 at 4:37 PM

No, try, "not (url ~/)"

Dec 18, 2012 at 5:15 PM

This is the answer not url"~/"