Customising the Page List Block
Permalink
I want to create a template for the page list block such that instead of a single list, the list wraps through multiple columns.
i.e. instead of
a
b
c
d
e
f
g
h
i
j
it would go
a d g
b e h
c f i
This could be delineated by using alphabetical sorting but by somehow querying each instance of the fetch method such that you would have a column for A-C, D-F, G-I etc for example.
Can anyone give me some help, pointers, tips on how to create this (which file would need editing and how for example?)
Cheers
Iain
i.e. instead of
a
b
c
d
e
f
g
h
i
j
it would go
a d g
b e h
c f i
This could be delineated by using alphabetical sorting but by somehow querying each instance of the fetch method such that you would have a column for A-C, D-F, G-I etc for example.
Can anyone give me some help, pointers, tips on how to create this (which file would need editing and how for example?)
Cheers
Iain
What would i need to do to change what part of my template i want the page-list to grab. ie instead of the page description... I want it to grab the what is on the page. I have tried <div class="ccm-page-list-description">
<?php
if(!$controller->truncateSummaries){
echo $_c->getAttribute['$main'];
}else{
echo $_c->getAttribute['$main']; $controller->truncateChars;
}
?>
</div> but didnt work. $main is the area i want the script to put on instead of the page description any ideas where im going wrong
<?php
if(!$controller->truncateSummaries){
echo $_c->getAttribute['$main'];
}else{
echo $_c->getAttribute['$main']; $controller->truncateChars;
}
?>
</div> but didnt work. $main is the area i want the script to put on instead of the page description any ideas where im going wrong
I'd like to achieve something like this as well, did you have any luck getting it to work.
copy the core view.php template from:
/concrete/blocks/pagelist/view.php
to (you'll have to create the directories too):
/blocks/pagelist/templates/three_column.php
Then you can modify that file to act however you'd like.
To get that template to display in c5, select an existing page list block, click on it in edit mode, click "set custom template" and you should see your new three column template in there.