Updated Page Block

Permalink 1 user found helpful
Hi Guys, I've updated my Page Block to support the new 5.3.3 attributes.
The Page Block will let you display any page with it's attributes (but no content) in a block somewhere else.
Don't wait for it to appear in the marketplace, code attached :-)
The code is also a good starting point to learn about collection attributes.

1 Attachment

matogertel
 
jincmd replied on at Permalink Reply
jincmd
doesnt work for me, it displays the page name
synlag replied on at Permalink Reply
synlag
... will finish it, updates go here

~edit: it works like a charme!!!

thx mato!!
jincmd replied on at Permalink Reply
jincmd
if its no trouble... thanks
matogertel replied on at Permalink Reply
matogertel
Hi Josh, this is the demo link:
http://www.codium.co.nz/page_block_for_concrete5/... although the code in my page is pre-5.3.3
reporthouse replied on at Permalink Reply
In my site, I intend to have 47 pages under a category. On each page, I have to display its name automatically. There will be a default page. Can this page block be of help to me?
TimDix replied on at Permalink Reply
TimDix
$c->getCollectionName() = name of the page
reporthouse replied on at Permalink Reply
I will try it.
olacom replied on at Permalink Reply
olacom
Hi!

I don't know if this block was ever submitted to the marketplace (I could not find it). Anyway, there's a bug in the controller's getValue function. When outputting the value of a textarea (Rich text), the output adds multiple <br /> because of the nl2br function being used around line 106.

Replace: $ret .= nl2br(trim($this->page->getAttributeValueObject($att)->getValue('display')));

With :
Loader::library('3rdparty/htmLawed');
$ret .= htmLawed($this->page->getAttributeValueObject($att)->getValue('display'), array('safe'=>1, 'deny_attribute'=>'style'));