We moved to new unified forum!

Please post all new support queries in our New Forum.

T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. Hasan
  2. General Discussion
  3. Saturday, 12 April 2014
  4.  Subscribe via email
Hi,
I want to create a new parameter in my template to display social icons in Joomla articles. I have added the parameter to my templateDetails.xml file like that:
			<fieldset name="my_params" label="MY_PARAMS_FEATURES">

<field name="CONTENT_SOCIAL_ICONS" type="radio" class="btn-group" default="0" description="If you enable this option, social share buttons (Facebook, Twitter, Google+) will be displayed in the Joomla articles." label="Social Share for Articles">
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

</fieldset>


And in /html/com_content/article/default.php I have added this at the top of the page:
$content_social = ($this->params->get("CONTENT_SOCIAL_ICONS",1));


And this:
<?php if ($content_social) : ?>
<div class="social-share">
<span>social share button is here</span>
</div>
<?php endif; ?>


But when I change the parameter from my Template Manager it doesn't effect whether to display or not. How can I get the template parameter in the Joomla article?

Thanks
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Hasan,

For what you expect, we call it custom fields in T3. You can add custom fields for articles, for form like menu or for module. Normally, it has 4 steps:

1. Create custom field group
2. Define custom fields in the group
3. Style the custom fields
4. Use the custom fields.

We have very detail documentation for this, please take a look, it would help you a lot.

1. Documentation: http://t3-framework.org/documentation/extend-com-content#add-extra-fields
2. Blog tutorial: http://www.joomlart.com/tutorials/joomla-tutorials/adding-joomla-custom-fields-in-article-with-t3-framework
3. Live demo: http://www.joomlart.com/user-site-showcase

Regards.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Hi,
Thank you for detailed response, I will check them.

Hasan
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Yeah, and please share when it's done. I am curious how your site looks like ;)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.