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.
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.
doesnt work for me, it displays the page name
... will finish it, updates go here
~edit: it works like a charme!!!
thx mato!!
~edit: it works like a charme!!!
thx mato!!
if its no trouble... thanks
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
http://www.codium.co.nz/page_block_for_concrete5/... although the code in my page is pre-5.3.3
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?
$c->getCollectionName() = name of the page
I will try it.
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'));
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'));