Hi all.
I am trying to create a new glbal content block.
Have created the block in admin with no problems.
The content block is showing on the page that {content block='new-content-block'} and I can edit the content in admin for that page.
The problem is that I do not know how to add a title to this content block. I cannot see any provision for it in admin.
What am I missing.
Thanks.
SOLVED: Showing title in new global content block
SOLVED: Showing title in new global content block
Last edited by WebBunyip on Sat Jul 12, 2008 11:54 pm, edited 1 time in total.
Re: Showing title in new global content block
You add the title in your template, like:
{* Start Content Area 2 *}
Content Two Title
{content block="content-block-2"}
{* End Content Area 2 *}
Nullig
{* Start Content Area 2 *}
Content Two Title
{content block="content-block-2"}
{* End Content Area 2 *}
Nullig
Re: Showing title in new global content block
And if you want to change the Title every time you add content, like a diff. title for diff. pages...
{content block="block2title" oneline="true"} this will give you a one line edit box to put the title in...
{content block="content-block-2"}
{content block="block2title" oneline="true"} this will give you a one line edit box to put the title in...
{content block="content-block-2"}
Re: Showing title in new global content block
Thanks guys.mark wrote: And if you want to change the Title every time you add content, like a diff. title for diff. pages...
{content block="block2title" oneline="true"} this will give you a one line edit box to put the title in...
{content block="content-block-2"}
I have done that mark.
It is quoting everything in the text box that has been placed in admin.
I am using the wireframe 3col as a base for the template.
The thing that I am wondering is that when I go to edit the page in admin, the blocks such as news, news2, block2, has an area where you can enter the block title, as well as the general text box.
The content block I created shows the text box in admin on the page I am trying to edit, but not a title field.
I tried the following.
This is the code in the template index file
Code: Select all
<div id="newblockbox">
<div id="boxheader">
<h2>{content block='newblock' oneline='true'}</h2>
</div>
<div id="newblock">
{content block='newblock'}
</div>
</div>
I tried by editing the first line in the text box as the heading for the block and then the rest of the text starting on a new line. It showed all the text in the header, rather than just the first line.
I know I am missing something silly.
Thanks again for your help.
Re: Showing title in new global content block
Yes, you can't have the same "name" for each block.
Change this:
{content block='newblock' oneline='true'}
to:
{content block='newblocktitle' oneline='true'}
Nullig
Change this:
{content block='newblock' oneline='true'}
to:
{content block='newblocktitle' oneline='true'}
Nullig
Re: Showing title in new global content block
Thanks Nullig.
Knew I was missing something silly.
Works fine now.
Thanks all.
Knew I was missing something silly.
Works fine now.
Thanks all.