Keyword

Adding HTML code into Extra Fields

More
13 years 10 months ago #76443 by Amy L Dent Beebe
Replied by Amy L Dent Beebe on topic Adding HTML code into Extra Fields
I can't seem to find the code above anywhere in any of my files...I ran a search on the entire site and it didn't come up, and I looked at the specific line.

 

I'm also confused because in the forums it seems to say that in any version after 2.3, this functionality is built in. I just downloaded 2.4 and I can't find any ability for an html field.

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

More
13 years 10 months ago #76444 by william white
Replied by william white on topic Adding HTML code into Extra Fields
Try looking in administrator/components/com_k2/controlers/ for the files

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

More
13 years 10 months ago #76445 by Amy L Dent Beebe
Replied by Amy L Dent Beebe on topic Adding HTML code into Extra Fields
I used Dreamweaver to do a search of the source code for the entire site, and neither of the pieces of code mentioned in the solution were found.

William White said:
Try looking in administrator/components/com_k2/controlers/ for the files

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

More
13 years 10 months ago #76446 by william white
Replied by william white on topic Adding HTML code into Extra Fields
You are correct - I used grep to search 2.4 and cannot locate it either. The code must have been changed. The files in question are there, but do not contain that particular code. Im not sure exactly what was changed

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

More
13 years 7 months ago #76447 by josh tischer
Replied by josh tischer on topic Adding HTML code into Extra Fields
in k2 2.4.1 this hack didn't exactly work I had to modify some other code.

 

details and documentation

 

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

More
13 years 4 months ago #76448 by Jock
Replied by Jock on topic Adding HTML code into Extra Fields
Hi Josh,

 

I am trying desperately to add some {gallery},{/gallery} code in an extra field but it is simply outputting the syntax.

 

I tried what you suggested above but it is not doing the job. I am using K2 2.4.1Is there something im missing here?

 

Many thanks if anyone has time to help me out here!

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

More
13 years 4 months ago #76449 by Odin Mayland
Replied by Odin Mayland on topic Adding HTML code into Extra Fields
I too would like to do this with 2.4.1

 

Anyone have any solutions?

 

 

Jock said:

Hi Josh,

 

I am trying desperately to add some {gallery},{/gallery} code in an extra field but it is simply outputting the syntax.

 

I tried what you suggested above but it is not doing the job. I am using K2 2.4.1Is there something im missing here?

 

Many thanks if anyone has time to help me out here!

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

More
13 years 4 months ago #76450 by Odin Mayland
Replied by Odin Mayland on topic Adding HTML code into Extra Fields
I found this info online but have yet to get it to work:

blog.codepyro.com/2011/03/enable-html-in-joomla-k2-extra-fields.html

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

More
13 years 4 months ago #76451 by Jock
Replied by Jock on topic Adding HTML code into Extra Fields
I ended up changing the code where it outputs the extrafields in item.php to this

 

<?php echo JHTML::_('content.prepare', $extraField->value); ?>

 

Worked a treat ^

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

More
13 years 4 months ago #76452 by Odin Mayland
Replied by Odin Mayland on topic Adding HTML code into Extra Fields
This appears to be the extrafields output in the item.php

 

<?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?> <!-- Item extra fields -->
<div class="itemExtraFields">
<h3><?php echo JText::_('Additional Info'); ?></h3>
<ul>
<?php foreach ($this->item->extra_fields as $key=>$extraField):?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
<span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
<span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
<br class="clr" />
</li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>

 

Assuming this is the same code you have, can you past in yours so that I can see where your line goes?

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


Powered by Kunena Forum