11 years ago
Topic

Good Day,

I'm struggling with creating a custom field for Social networks/Email on Content or List view.  I've created a custom content view template and list templates.  Everything working as desired (I love SEBLOD BTW).  However, how can I create a custom field that when clicked on it opens to an website?  IMPORTANT I need to have the field partially completed. 

For example:  A user enters his Twitter ID:  seblod  in the form

http://twitter.com/#!/ is added to the output of the field

So when the hovered/clicked on the link it goes to:  http://twitter.com/#!/seblod

Now one more additional factor:  I'm not using text or image for the link, but CSS [button]

I am able to create the above in my custom template, BUT the CSS [button] is shown even if the field has nothing in it.  Which is not the desired effect.

So probably the best way is to use Seblod's typo/link/html features along with <?php echo $item->renderField('user_twitterid');?>  in my custom template.  I have tried a bunch of options and can't get it to work.   I'm open to any suggestions!

Please help!  Thanks!


Joomla 3.1.1 and Seblod 3.1.3

Get a Book for SEBLOD
RD
11 years ago
0
Level 1

Wow, what a painful learning curve! :):)  OK, finally figured out how to use #3 Typo -> HTML +.  The key was found in this post: https://www.seblod.com/community/forums/templates-position-variations/seblod-variables-in-the-html-template

" The template HTML is exactly the same thing of the plugin typo HTML. That's mean you don't need to put php tag. So remove your <?php echo and keep only your $cck->getText('your_field') "

in the HTML +:

<span>

<a href="http://twitter.com/#!/$cck->getValue('twitter')" alt="Follow $cck->getValue('ee_name') on Twitter" title="Follow $cck->getValue('ee_name') on Twitter" >

<span class="box2 rt-small-icon"><span aria-hidden="true" class="rokicon-twitter2 spacer"></span>

</span>

</a>

</span>

In my custom list template:  <?php echo $item->renderField('twitter'); ?>

NOTE:  $cck is used in the HTML+ even though $item is used in the custom list template.



251 Posts
Viktor Iwan
11 years ago
1
Level 1

Hi RD ! you just get into the next level of becoming seblod developer... Over the years, Octopoos and other contributor has been 'preach' around main joomla event on how powerful seblod is... but most people decide not to use seblod just because they're lazy enough or expect 'out of the box' & 'easy drag n drop' & 'plug n play' apps...and most of all a robust learning curve !

What make me sad is people are easy to complain on this powerful apps rather than contribute and make it better.. and i'm glad you have overcome one of the limitation you find in seblod... anyway there's more about this typo html plugin.. you can see the doc here: http://www.seblod.com/v2/3891-plugin-typo-html.html

why it does not use <?php ?> because it using eval() to render..

There are user who like to begin a study group on seblod, hope you can also join here https://plus.google.com/communities/102930815299577165538

 

RD
11 years ago
0
Level 2

Thank you!  I would like to participate in the study group on Seblod.  When  I click on the link, it states: 

Want to participate in this private community?
You must have an invitation to join this private community.


41 Posts
Umair Hassan
11 years ago
0
Level 1

Hi,

Can you send me invitation for Seblod Community on Google plus. https://plus.google.com/communities/102930815299577165538


my email is : uhking@gmail.com


Thanks,

Umair

Get a Book for SEBLOD