Google Groups Home
Help | Sign in
( resubmit w/fix ) How do I vary certain contents?
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
  4 messages - Collapse all
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
Pauli  
View profile
 More options 9 Jul, 17:05
From: Pauli <pauli.pr...@gmail.com>
Date: Wed, 9 Jul 2008 09:05:33 -0700 (PDT)
Local: Wed 9 Jul 2008 17:05
Subject: ( resubmit w/fix ) How do I vary certain contents?
How do I vary certain contents based on a page property?  I'm thinking
this ( momentarily without ability to lookup partial syntax,
"dayjob").

some-page.haml

- type = "category1"

layout.haml

= if ( type == "category1") partial-for-category1

Pauli

PS. would have replied to previous, but can't see it -- not sure if it
made it through.


    Reply    Reply to author    Forward  
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.
Ryan Mulligan  
View profile
 More options 9 Jul, 18:33
From: "Ryan Mulligan" <r...@ryantm.com>
Date: Wed, 9 Jul 2008 12:33:55 -0500
Local: Wed 9 Jul 2008 18:33
Subject: Re: ( resubmit w/fix ) How do I vary certain contents?

I would just do...

-if type == "category1"
  =render :partial => "catagory1"
-elsif type == "category2"
  =render :partial => "catagory2"


    Reply    Reply to author    Forward  
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.
Stephen Bartholomew  
View profile
 More options 9 Jul, 20:38
From: Stephen Bartholomew <st...@curve21.com>
Date: Wed, 9 Jul 2008 12:38:02 -0700 (PDT)
Local: Wed 9 Jul 2008 20:38
Subject: Re: ( resubmit w/fix ) How do I vary certain contents?
It's also worth considering using a helper for this to keep logic out
of your templates.

Steve

On 9 Jul, 18:33, "Ryan Mulligan" <r...@ryantm.com> wrote:


    Reply    Reply to author    Forward  
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.
Pauli  
View profile
 More options 9 Jul, 22:34
From: Pauli <pauli.pr...@gmail.com>
Date: Wed, 9 Jul 2008 14:34:34 -0700 (PDT)
Local: Wed 9 Jul 2008 22:34
Subject: Re: ( resubmit w/fix ) How do I vary certain contents?
helpers are new since I last looked at staticmatic ( everything is, I
gather - a lot changes in a year! )

what would it look like with helpers?

Pauli

On Jul 9, 3:38 pm, Stephen Bartholomew <st...@curve21.com> wrote:


    Reply    Reply to author    Forward  
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 »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google