Joomla! Works Tabs and Slides -JWTS and Flexicontent

More
13 years 8 months ago - 13 years 8 months ago #9121 by kippa
Hi

I am using Joomla! Works Tabs and Slides (JWTS) plugin with FLEXIcontent' to display submitted form data in a tabular format.

The example below shows how to add JWTS to FLEXIcontent’s item layout - available zone - description field.

When an available field is dragged and dropped into the template available zones description field, its contents will be rendered in a tab layout on a Joomla webpage.

I first copied the default template (named it default-1) and then made changes to the default-1.php file located at

..\components\com-flexicontent\template\default-1\item.php.


Use a text editor to change the code:
Code:
<!-- BOF description --> <div class="description"> <?php foreach ($this->item->positions['description'] as $field) : ?> <?php if ($field->label) : ?> <div class="desc-title"><?php echo $field->label; ?></div> <?php endif; ?> <div class="desc-content"><?php echo $field->display; ?></div> <?php endforeach; ?> </div> <!-- EOF description -->

to:
Code:
<!-- BOF description --> <div class="description"> <?php $content = ''; ?> <?php foreach ($this->item->positions['description'] as $field) : if (!empty($field->display)) : { $content .= '{tab='; $content .= $field->label; $content .= '}'; $content .= $field->display; } endif; endforeach; if (!empty($content)): $content .= '
'; echo JHTML::_('content.prepare', $content); endif; ?> </div> <!-- EOF description -->

The code checks if there is any data in the FLEXIcontent available zones description field. It then assigns the $field->label as the JWTS label and the $field->display to the JWTS text. In this example the JWTS behaves dynamically and only the fields that are in the FLEXIcontent available zones description field, that contain display data are displayed on a Joomla! webpage.

All you need to do now is open up the item layout of default-1 template in FLEXIcontents template manager. Next drag n drop a field into the available zones description field.

Enjoy - Hope this helps...
Last edit: 13 years 8 months ago by yopyop001. Reason: Title change

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

More
13 years 7 months ago #9738 by Nudles
Hello,
I change the code and than I get
In discription field this {tab=} {tab=FieldLabel}
Any Ideas?

Moin moin und immer eine handbreit Wasser unter dem Kiel

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

More
13 years 7 months ago #9739 by Nudles
Problem solved, my mistake. Sorry.

Moin moin und immer eine handbreit Wasser unter dem Kiel

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

More
13 years 6 months ago #9876 by micker
cool thanks

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
13 years 3 months ago #12493 by DonS
Kippa,

Your workaround for JWTS works fine except I get an errant "{tab=}" presenting itself above the article description field.
www.artsouthend.com/pi/index.php?option=...article-3&Itemid=281

Does anyone know if JWTS can work somehow without entering user field names as Kippa has configured? We want to use TS in quantity and on many pages, editing content frequently, and Kippa's excellent solution is cumbersome for this scenario. I tried inserting JWTS as a module inside a Flexicontent article but with no luck.

Am out of ideas and php knowledge.

Any hope here?

Thanks.

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

More
13 years 3 months ago #12502 by hossam abohassan
Greaaaaaaaaaaat
thank you :)

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.290 seconds
Powered by Kunena Forum
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline