Keyword

Load module in item.php template

  • Edu Abril M
  • Edu Abril M's Avatar Topic Author
  • Offline
  • New Member
More
10 years 11 months ago #119919 by Edu Abril M
Load module in item.php template was created by Edu Abril M
Hi, I'm using Joomla 2.5.14, K2 2.6.7 and Contact enhanced 2.5.2. I created a module that calls a contact form from Contact enhanced; the module is published but it doesn't have any page assigned to it so it doesn't appear on the category listings.

I want to be able to load the module (name: "mycecontact" , position assigned: "user5") within the item.php of my k2 so it's displayed only in the item page.

I've tried different options but nothing seems to load the module. How should I do it? Do I need to load it using the module's name, module's position... is there any other way to load the module so it appears only in the item view of my k2 article?

Many thanks. I appreciate your time and help in advance.

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

  • olsen
  • olsen's Avatar
  • Offline
  • Elite Member
  • Joomla and K2 Freelancer
More
10 years 11 months ago #119920 by olsen
Replied by olsen on topic Re: Load module in item.php template
You can call a module within your article on two ways:

{loadposition YOURMODULEPOSITION} ex. {loadposition myposition}
{loadmodule MODULETYPE} ex. {loadmodule login}

Didn't solve your issues?? Why dont you consider hire me? Email me or contact me www.xevedigital.com for details

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 11 months ago #119921 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Load module in item.php template
Please search the forum before posting.

The answer is in this top getk2.org/community/New-to-K2-Ask-here-first/179921-Add-a-Module-position-to-K2-Template-do-it-better#179921

PS. What Olsen suggested also works.

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

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

More
10 years 11 months ago - 10 years 11 months ago #119922 by caseyz
Similar Problem here, I'm trying to process a plugin through buy adding the snippet in the item.php.

More specifically I have a gallery plugin (SIGPLUS) and am using the extra fields to simplify the workflow foir my client by only requiring them to insert the name of their upload folder and wrapping it in the snippet through the item.php. the syntax processes fine when placed in an item editor body, but ignored when placed in the index.php and only returns the "{gallery}birds{/gallery}, and the actual image gallery is not rendered. Any help would be appreciated.

<div>
{gallery}
<?php echo $this->item->extraFields->galleryfolder->value;?>
{/gallery}
</div>


another poster with similar Q's

getk2.org/community/New-to-K2-Ask-here-first/172276-Run-external-plugins-tags-in-itemphp-ej-map#172276

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 11 months ago #119923 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Load module in item.php template (plugin)
this cannot be done. Joomla! does not support snippets/shortcode rendering in its core PHP files.

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