Keyword

K2 Attachments

  • Luis Ordonez
  • Luis Ordonez's Avatar Topic Author
  • Offline
  • New Member
More
8 years 6 months ago - 8 years 6 months ago #151978 by Luis Ordonez
K2 Attachments was created by Luis Ordonez
Hello,

I was wondering does any one have a better way to display K2 Attachments in my K2 items. I just need a way for the attachments to be separated on each line or a little cleaner look.

Here is how it looks now

www.napswhatsinitforme.com/k2-categories/item/500-nonbargaining-promotional-pay-policy-revisions

Thank you
Last edit: 8 years 6 months ago by Luis Ordonez.

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #151985 by Javi Mata
Replied by Javi Mata on topic K2 Attachments
in each attachment can put a title, and edit the module

in the module you can see some like this:

<?php if($params->get('itemAttachments') && count($item->attachments)): ?>
<div class="moduleAttachments">
<?php foreach ($item->attachments as $attachment): ?>
<a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo $attachment->link; ?>"><?php echo $attachment->title; ?></a>
<?php endforeach; ?>
</div>
<?php endif; ?>

you can add a ul list or <br> after the </a>


or can use CSS with some like:
.moduleAttachments a { display:block; }

Twitter: @Javi_Mata
Web: www.javimata.com

Please Log in or Create an account to join the conversation.

  • Luis Ordonez
  • Luis Ordonez's Avatar Topic Author
  • Offline
  • New Member
More
8 years 6 months ago #151991 by Luis Ordonez
Replied by Luis Ordonez on topic K2 Attachments
Thank you Javi Mata, I really appreciate the help.

What file and where is it located where I can edit the module?

Thank you

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #152021 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Attachments
Kudos Javi once more :)
Just make sure to use overrides instead of editing core files.
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum