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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
jasonimani
New Member
New Member
Posts: 5
Joined: Thu Feb 12, 2009 6:21 pm

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

Post 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
Last edited by jasonimani on Sat Feb 14, 2009 6:44 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

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

Post 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}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
jasonimani
New Member
New Member
Posts: 5
Joined: Thu Feb 12, 2009 6:21 pm

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

Post 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?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

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

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
jasonimani
New Member
New Member
Posts: 5
Joined: Thu Feb 12, 2009 6:21 pm

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

Post by jasonimani »

Thanks! You rock!
Post Reply

Return to “CMSMS Core”