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:
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:
> 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:
> > 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.
$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-
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:
> 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:
> > 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:
> > > 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.
> $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:
> > 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:
> > > 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:
> > > > 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.
> $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:
> > 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:
> > > 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:
> > > > 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.
> 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:
> > $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:
> > > 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:
> > > > 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:
> > > > > 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.- Hide quoted text -