Pageblocks - not appearing in content

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
tdj

Pageblocks - not appearing in content

Post by tdj »

I have just briefly looked at PageBlocks. This is a great idea, for defining the kind of content users add.

I can add pageblocks, also within other page blocks - but I do not really get the output I expect.

Followed the example from the job opp, and put this in my PageBlock template:

Code: Select all

<div id="{$alias}">
Job Title: {$title}
Work Experience required: {content block="Work Experience"}
Detailed Description: {content block="Detailed Description"}
Person to Contact: {content block="Contact Person" oneline="true"}
This job posting was last modified: {$modified}
</div>
Yet I only see in the output content from Job Title and Last Modified. No matter how much I enter into the Content, work experience and Contact fields, they are not output on the site.

What do I have to do ?
iNSiPiD

Re: Pageblocks - not appearing in content

Post by iNSiPiD »

tdj,

You seem to be mixing your content types.

The {content} tag is reserved for content of type Page. When you put {content block='Second Content Block'} in a template, all you are doing is creating a second editable textarea to the Page Edit screen.

If you want to use re-usbale HTML content you would use a Global Content Block. An example is the "footer" GCB which is part of the default installation. Go to Content->Global Content Blocks to see the example.

You would then call this from your template using {global_content name='footer'}.

Pageblocks are a third party module developed by elijahlofgren. For support, I would recommend visiting the #cms channel on irc.freenode.net or posting a help/bug request on the project page - http://dev.cmsmadesimple.org/projects/pageblocks

This may well be the result of a bug as earlier versions I've used have worked as expected.
m e l

Re: Pageblocks - not appearing in content

Post by m e l »

hi, try not using empty spaces in the block attribute. i had the same problem and this worked for me.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Pageblocks - not appearing in content

Post by Elijah Lofgren »

Mel|webdev wrote: hi, try not using empty spaces in the block attribute. i had the same problem and this worked for me.
Hmm.. I should update the help file then. I should have tested this. Thanks for pointing this out.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Pageblocks - not appearing in content

Post by Elijah Lofgren »

I've updated the module help and released a new version of PageBlocks.  ;)
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: Pageblocks - not appearing in content

Post by applejack »

Hi Elijah

I only installed page blocks 0.1.5 via the Module Manager a few days ago and still the same problem. No spaces allowed in block name. Also it is confusing in that single quotes don't work and oneline="true" has to be after the block name and therefore works differently from CMSMS's main content blocks.

Also I wish to find out if it is possible to have different page blocks within more than one content block of a template and if so how. If not then please take this as a request. I would appreciate it is you could let me know asap as I am working on a site which I am hoping to be able to do this.

Website Design & Production
http://www.applejack.co.uk
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Pageblocks - not appearing in content

Post by Elijah Lofgren »

applejack wrote: I only installed page blocks 0.1.5 via the Module Manager a few days ago and still the same problem. No spaces allowed in block name. Also it is confusing in that single quotes don't work and oneline="true" has to be after the block name and therefore works differently from CMSMS's main content blocks.
I'm currently very busy with my summer programming job and I don't have time to work on fixing this. I'd appreciate it if you would file those problems as bugs here: http://dev.cmsmadesimple.org/tracker/?a ... unc=browse Someday, I may have time to work on fixing them.
applejack wrote: Also I wish to find out if it is possible to have different page blocks within more than one content block of a template and if so how. If not then please take this as a request. I would appreciate it is you could let me know asap as I am working on a site which I am hoping to be able to do this.
I think you could do this two different ways, neither of which are optimal, but I don't have time to work on PageBlocks more right now.

1. You could create 2 different blocks on the page. 1 called "Content Section 1" or something and the other "Content Section 2".
Add all the other blocks as children of either "Content Section 1"  or "Content Section 2".

Then in the 1st content block of your page template find the id of "Content Section 1" (look at the URL when editing it) and if it was 52 you would put this:

Code: Select all

{cms_module module='pageblocks' show_children_of='52'}
Then in the 2nd content block of your page template find the id of "Content Section 2" (look at the URL when editing it) and if it was 76 you would put this:

Code: Select all

{cms_module module='pageblocks' show_children_of='76'}


2. Or, Option #2: Create a new page, set it as not active so it doesn't show up on your site. Attach the blocks you want in the second content block of your other page to that new page and then call pageblocks like this (if 23 was the id of that new page):

Code: Select all

{cms_module module='pageblocks' page_id='23'}
Hope this helps,

Elijah
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Locked

Return to “Modules/Add-Ons”