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
Conditional content on static pages
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
  2 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
 
Jonathan Sibley  
View profile  
 More options Jul 7 2012, 11:24 pm
From: Jonathan Sibley <jonsib...@gmail.com>
Date: Sat, 7 Jul 2012 20:24:04 -0700 (PDT)
Local: Sat, Jul 7 2012 11:24 pm
Subject: Conditional content on static pages

Hi all,

I'm new to Blogofile, and I'm working off the simple version of the example
to build my own site.  I'd like to be able to put something at the top of
my website that only appears on certain pages.  For example, I'd like it to
appear on the static page defined by index.html.mako, but not on another
static page called about.html.mako.  Is it possible to call a function
topContent() in _templates/site.mako, but have the definition of that
function reside in about.html.mako and index.html.mako?  Then I would be
able to define topContent() differently for whichever page is being
displayed.  I've tried calling next.topContent() in site.mako, but perhaps
one problem is that I don't understand inheritance very well in Mako yet :)

I'd really appreciate any help anyone might be able to offer!

Thanks,

Jonathan


 
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.
Doug Latornell  
View profile  
 More options Jul 8 2012, 10:05 am
From: Doug Latornell <djlatorn...@gmail.com>
Date: Sun, 8 Jul 2012 07:05:48 -0700 (PDT)
Local: Sun, Jul 8 2012 10:05 am
Subject: Re: Conditional content on static pages

I think that what you're trying to do is just a matter of getting the Mako
inheritance sorted out. If you are using blogofile 0.8.dev from github, you
may be having problems getting it to work because of the "template use
order" bug that Ravi and I are working on [1]. Try working things out in a
minimal example using Mako directly in the Python interpreter or a small
script.

[1]
https://groups.google.com/forum/#!msg/blogofile-discuss/mUWTkXUvjGo/D...

Things are going a little slowly on my end of the template order bug
because I have family from afar visiting and perfect summer weather has
suddenly arrived here in Vancouver...

Doug


 
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 »