Page 1 of 1

How do I specify HTML content as the default for a content block.[SOLVED]

Posted: Thu Feb 12, 2009 7:18 pm
by jasonimani
Hi,

I'm a newbie at this, so my apologies if I'm not clear. I've also searched the forums for a solution to my problem and there was one post I tried following, but I must not be doing something right.

Here's what I'm trying to do. I have a 2 column website, the sidebar I want to default to (unless it's changed):

Teens In Public Service (TIPS), is a non-profit organization dedicated to developing future leaders committed to their communities. TIPS selects teen leaders and places them as interns in charitable organizations throughout Seattle.
"TIPS is a competitive and prestigious program. It is designed to enhance the social consciousness of tomorrow's leaders."

-Maureen Brotherton,
Co-Founder and President

The post I was trying to follow said use:

{content block="sidebar" default="$default_content"}

and use this:

{capture assign=default_content}
some content here
{/capture}

But where do I put that? or is there some other way of achieving this? What am I doing wrong?

Thank you for your help,


Jason

Re: How do I specify HTML content as the default for a content block.

Posted: Thu Feb 12, 2009 7:22 pm
by calguy1000
You are so close it's incredible... and thanks for doing your research.... I'll give you the last step.

Put this code into your page template.... it should work fine for you.

Code: Select all

{capture assign='default_content'}
some content here
{/capture}
{content block="sidebar" default=$default_content}

Re: How do I specify HTML content as the default for a content block.

Posted: Thu Feb 12, 2009 8:28 pm
by jasonimani
Thanks again for your help. That's what I though, so I did this:


{capture assign='default_content'}
      Teens In Public Service (TIPS), is a non-profit organization dedicated to developing future leaders committed to their communities. TIPS selects teen leaders and places them as interns in
        charitable organizations throughout Seattle.

        "TIPS is a competitive and prestigious program. It is designed to enhance the social consciousness of tomorrow's leaders."

       

        -Maureen Brotherton,

        Co-Founder and President
{/capture}
{content block="sidebar" default=$default_content}


But it still won't show up. Any additional thoughts?

Re: How do I specify HTML content as the default for a content block.

Posted: Sat Feb 14, 2009 3:20 pm
by calguy1000
actually, my mechanism won't work.

what  you need to do is something like:

Code: Select all

{content block='sidebar' assign='sidebar'}
{if empty($sidebar)}
<h1>Teens In Public Service (TIPS), is a non-profit organization dedicated to developing future leaders committed to their communities. TIPS selects teen leaders and places them as interns in charitable organizations throughout Seattle.<br />
 "TIPS is a competitive and prestigious program. It is designed to enhance the social consciousness of tomorrow's leaders." <br /><br />
-Maureen Brotherton, <br />
Co-Founder and President</h1>
{else}
{$sidebar}
{/if}
This will use that above h1 line if nothing is entered in the sidebar text area when editing a page.

Re: How do I specify HTML content as the default for a content block.

Posted: Sat Feb 14, 2009 6:41 pm
by jasonimani
Thanks! You rock!