Simple block with image, title, description and url

Permalink
Hi
I am working on a site that has a links page and was wondering if there is a block that could achieve something similar to the attached file. I want a image on the left and on the right a Title, Description and a url link.
The only block I have found is Remo's staff block which is very close but I want it to have an additional Title and url link. I have tried editing Remo's block but as I don't know much about PHP I can't get it to work.

Thanks in advance
Karl

1 Attachment

abovecreative
 
binoy replied on at Permalink Reply
binoy
Could you look into the 'Search Tools' package by Matogertel? I think it would be useful to you.
abovecreative replied on at Permalink Reply
abovecreative
Cheers but I think thats a bit to overkill for what I want. I was thinking more along these lines:

http://www.codeblog.ch/2009/06/concrete5-staff-table/...

but with the addition of a Title field and a field that allows a web address to be added.
jgarcia replied on at Permalink Reply
jgarcia
Data Display would allow you to achieve this perfectly. It's slightly more complex to set, but I'd be glad to assist you in getting it setup.

http://www.concrete5.org/marketplace/addons/data-display/...
RadiantWeb replied on at Permalink Reply
RadiantWeb
I agree data display is the way to go.

C
binoy replied on at Permalink Reply
binoy
Data display package currently does not work with c5 5.4 (atleast for me). jgarcia has promised to look into it. But it is perfectly ok with 5.3.1.
jgarcia replied on at Permalink Reply
jgarcia
working on it binoy :) just the approve/unapprove part right?
binoy replied on at Permalink Reply
binoy
True. But without 'approve/unapprove', part, that I could not look further into the compatibility of the package with 5.4. I am currently using the package with 5.3.1. It works perfectly beautiful. it is one of the most useful packages among all addons, no doubt.
jgarcia replied on at Permalink Reply
jgarcia
I'm looking into it now. I suspect it's something pretty simple. Thanks for the comment :)
binoy replied on at Permalink Reply
binoy
great. thank you. kindly inform when it is ok. because of this small issue, i have not upgraded the site to 5.4, and; remain denied of all new charmings of c5 5.4.
jgarcia replied on at Permalink Reply
jgarcia
New Data Display version is up: 1.2.1.
binoy replied on at Permalink Reply
binoy
Thank you. i am just installing and looking into it. version number is still 1.2 in the market place?
Remo replied on at Permalink Reply
Remo
Adding two simple fields is rather easy. Try to have a look at all the fields in the package. Start with db.xml and copy two attributes and edit the html form and you're pretty much done...
binoy replied on at Permalink Reply
binoy
Now Data Display Package works fine with C5 5.4.0 installation in my site.
abovecreative replied on at Permalink Reply
abovecreative
I had already tried editing Remo's block to include a extra field but when I add the block the tile entry doesn't doesn't show up. The entry field appears in the pop up window so I guess its not being added to the database.

Here is what I did:

In db.xml added:
<field name="title" type="X2">
</field>

In controller.php added:
function getTitle() {return $this->title;} just above function getDescription() {return $this->description;}

In form.php added:
<div class="ccm-block-field-group">
<h2><?=t('Title')?></h2>
<?= $form->textarea('title', $title, array('style' => 'width: 280px;height:120px;')); ?>
</div>

In view.php added:
echo "<div class=\"ccm-person-title\">" .nl2br($controller->title) ."</div>";

Can anybody see what I might be missing/doing wrong. Cheers.
abovecreative replied on at Permalink Reply
abovecreative
Figured out where I was going wrong. I was stupidly editing the files on the server and not thought that the database table will have been added when the block was installed. Works fine now I have re-installed the block.
millo replied on at Permalink Reply
hi remo,
can you tell me where i can get a copy of this code? i'm looking to do the same thing but haven't found a solution yet.
cheers.