HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Exclude Welcome Page from a CSS Style

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#73176 (In Topic #15320)
Avatar

Community saint

Can someone please help me with the following tempcode declaration?

I'm trying to exclude only the Main Page from a CSS style, but do not seem to be using the correct syntax.

The Zone is "Welcome"
The page is "start"

Thanks,
Jean

PHP code

{+START,IF,{$NOT,{$MATCH_KEY_MATCH,Welcome:start}}}
 ---this css_style---
{+
END}
Back to the top
 
Posted
Rating:
#73177
Avatar

ok 2 probs…

1- You can't use this level of contextualisation in CSS files, except no_cache.css, because they are compiled statically to a single place.

2- Remove 'Welcome'. That's the title for the zone, the codename is just blank.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73179
Avatar

Community saint

Thanks Chris!

But I'm not sure I follow you correctly there.

There are many instances of

Code

{+START,IF,{$NOT,{$MOBILE}}}
 in the css, so if I understand you correctly, this statement is compiled and no other similar test statements can be accepted.

I've now tried the no_cache.css with my example,

Code

{+START,IF,{$NOT,{$MATCH_KEY_MATCH,:start}}}css_style{+END} 
 but it creates flashes of my new style changes on and off, as I guess the cache is eliminating it on refresh.

Sorry, but I'm not sure how this works.
Maybe I'm trying do produce the effect I want the wrong way.
What I would like to achieve is to have the global_middle_ph background visible on the entire site except on the start page. I cannot use just the "start" name of the page since all zones have a default "start" page name.
Back to the top
 
Posted
Rating:
#73192
Avatar

The CSS is cached separately for mobile vs non-mobile, and ssl vs non-ssl, as these are special cases we need to handle.

I can't explain any issue with no_cache.css, your code looks fine to me. no_cache.css is effectively included into the page <head> and evaluated on each page load.

You can always put something like class="zone_running_forum" into your GLOBAL.tpl so that you may use .zone_running_#page_running_start as a selector.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73196
Avatar

Community saint

No more problem Chris, the no_cache.css adjustment is working fine with Chrome.:thumbs: My Firefox seems to be very faulty at the moment, even after a re-install. I'll investigate that later on tomorrow.

I'll look at your suggestion about GLOBAL.tpl, but at first glance I'm not sure I understand the usage of .zone_running_#page_running_start as a selector.

Thanks again!

Jean
Back to the top
 
Posted
Rating:
#73199
Avatar

.zone_running_#page_running_start selects <div class="zone_running_" id="page_running_start">
(so if you have <div class="zone_running_{$ZONE*}" id="page_running_{$PAGE*}"> in your template)
There's no space between .zone_running_ and #page_running_start because it's being selected against the same div. Useful CSS technique although does not work on IE6.
Welcome zone is blank name (which explains the trailing underscore).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73227
Avatar

Community saint

Thanks for these additional details Chris!

This will surely help my experimentation with this technique. I just hope I can get creative with this tip!

I hope to finish my new Theming project over the weekend. Presently adding some HTML5/CSS3 animation to it with the new Adobe Edge preview. I had a bit of a problem integrating the JS script at first, but it is sorted out now. It was a whole lot easier with Flash, but I've got to move with the times!;)

:thumbs:
Back to the top
 
Posted
Rating:
#73229
Avatar

Interesting :).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73231
Avatar

Community saint

Jean-

How was using Edge? I planned to download and take a look at it once I get some time. I won't be using much animation on the site but there are a few places and I thought I'd give Edge a look.

Bob
Back to the top
 
Posted
Rating:
#73233
Avatar

Community saint

BobS said

Jean-

How was using Edge? I planned to download and take a look at it once I get some time. I won't be using much animation on the site but there are a few places and I thought I'd give Edge a look.

Bob
Great!
If you are familiar with Flash, it is practically the same interface time-line but in a simpler way.

What's even more awesome, is its ability to work right on an existing HTML page and produce all the CSS adjustments. I can imagine the potential for making interesting comcode pages.

This is well worth a try! :thumbs:
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: