>> GreenByte.info By Nick Tong (quiksilv) | Supported by: TalkWebSolutions.co.uk

Running on BlogCFC 5.1 Alpha Part 2

No sooner I update to blogCFC alpha Ray decides to release another. This time the admin area contains a link for text blocks?

What the heck are text blocks?

Text blocks allow you to create... wait for it.... text blocks. These newly created text blocks can then be output on your screen, in pods the site layout - where every you like.

An example of using a text block could be that you want to advertise a local events in your area. You create a pod add the output code (show below) and away you go. Hang on... why not just add the event info directly to the pod and upload that? Well if the event changes a lot why would you want to play about with the pod code each time, you can just edit the text block.

To output your newly created text blocks add this to your code/pod etc

<cfoutput>#application.textblock.getTextBlockContent("textBlockName")#</cfoutput>

To see what else you can do/use with text blocks just dump the textblock function:

<cfdump var="#application.textblock#" label="textblock" />

What this would be great is if you could output coldfusion within the 'Pages' (see related link). This way you could stay away from the blog code even more.

MSSQL for textBlocks table:

CREATE TABLE [dbo].[tblBlogTextBlocks] (
   [id] [nvarchar] (35) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
   [label] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
   [body] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
   [blog] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO


 

Related Blog Entries

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.5.1.