Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
is_page
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adam  
View profile  
 More options May 10 2008, 9:12 pm
From: Adam <akwil...@gmail.com>
Date: Sat, 10 May 2008 18:12:36 -0700 (PDT)
Local: Sat, May 10 2008 9:12 pm
Subject: is_page
In Wordpress, (spits in corner), you can call a function based on the
page slug:

<?php if ( (is_home())?>
<p>this is the homepage!</p>
<?php } } ?>

Now, I would have assumed that should this be possible in Habari, the
code would be:

<?php if ( is_page( 'about' ) ) :?>
<p>Yes, it's an extender! Fantastic. That is the icing on the cake.</
p>
<?php endif; ?>

However, all this does is kill my sidebar, (which is where I am
calling it from).

All correct answers are in the running for the grand prize of empty
promises in a variety of colours.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew da Silva  
View profile  
 More options May 10 2008, 11:15 pm
From: Andrew da Silva <andrewdasi...@mac.com>
Date: Sat, 10 May 2008 20:15:32 -0700 (PDT)
Local: Sat, May 10 2008 11:15 pm
Subject: Re: is_page
I'll take a blog design for 500 Bob!

$request->display_home

display_home being the RewriteRule name, for a specific page, you'ld
do $request->display_page (or display_entry) with a check against the
$post->slug == 'about'

Did that make sense?

On May 10, 9:12 pm, Adam <akwil...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam  
View profile  
 More options May 11 2008, 5:19 am
From: Adam <akwil...@gmail.com>
Date: Sun, 11 May 2008 02:19:15 -0700 (PDT)
Local: Sun, May 11 2008 5:19 am
Subject: Re: is_page
Erm... no, sorry that didn't make sense.
I'm going to need more help, where am I putting the $request->, on the
page I want the information displayed, or in the theme.php.

Also, how are I structuring the code, is it all in one long php line,
or top and tailing my content?

Once I know, I'll stick it in the wiki if only so I know myself next
time!

On May 11, 4:15 am, Andrew da Silva <andrewdasi...@mac.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rick c  
View profile  
 More options May 11 2008, 8:58 am
From: rick c <rickcock...@gmail.com>
Date: Sun, 11 May 2008 05:58:24 -0700 (PDT)
Local: Sun, May 11 2008 8:58 am
Subject: Re: is_page
$request is a member variable of the theme class you are using, so it
is more commonly used in one of the theme's templates. If you do use
it in your theme.php, it would need to be refer to in the form $this-
>request->*type of page requested*. http://wiki.habariproject.org/en/User:mikelietz

lists the built-in page types that can be attributes of the $request
object.

For the 'about' example you gave, code similar to

<?php if ( $request->display_home && $post->slug == 'about' ) { ?>
<p>We're on the home page, Bob!</p>
<?php } else { ?>
<p>Help! I'm being held captive!</p>
<?php } ?>

should work.

Rick

On May 11, 5:19 am, Adam <akwil...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam  
View profile  
 More options May 11 2008, 3:16 pm
From: Adam <akwil...@gmail.com>
Date: Sun, 11 May 2008 12:16:27 -0700 (PDT)
Local: Sun, May 11 2008 3:16 pm
Subject: Re: is_page
That's great, thank-you.

On May 11, 1:58 pm, rick c <rickcock...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mikelietz  
View profile  
 More options May 14 2008, 10:05 pm
From: mikelietz <cod...@gmail.com>
Date: Wed, 14 May 2008 19:05:06 -0700 (PDT)
Local: Wed, May 14 2008 10:05 pm
Subject: Re: is_page
Hm, since this is actually useful information perhaps it belongs in
the regular wiki hierarchy. Where do objects go?

On May 11, 8:58 am, rick c <rickcock...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam  
View profile  
 More options May 15 2008, 9:51 am
From: Adam <akwil...@gmail.com>
Date: Thu, 15 May 2008 06:51:04 -0700 (PDT)
Local: Thurs, May 15 2008 9:51 am
Subject: Re: is_page
I've wikified the responce from Rick C:

http://wiki.habariproject.org/en/Request_Display_Content

There are some points I want to test regarding certain page types,
I'll finish it when I get home tonight.

On May 15, 3:05 am, mikelietz <cod...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »