Adding cust tabs for experience

More
6 years 5 months ago #10767 by GregLaski
Adding cust tabs for experience was created by GregLaski
I can see a couple of people requesting this feature already.

Can Dear dev team add custom fields for adding a specific description to experiences template? In an example, I'd like to put extra info about the tour guide to the description or a field with embedded google map with the whole itinerary.
The following user(s) said Thank You: Yves PUECH

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

More
6 years 3 months ago #10958 by biosphaera
Replied by biosphaera on topic Adding cust tabs for experience
The feature would be useful for me too
The following user(s) said Thank You: GregLaski

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

More
6 years 3 months ago #11029 by GregLaski
Replied by GregLaski on topic Adding cust tabs for experience
Dear Solidres Dev team, any chances for getting this implemented?

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

More
5 years 7 months ago #12009 by emersonandrade
Replied by emersonandrade on topic Adding cust tabs for experience
For me it is necessary also.

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

More
5 years 2 months ago #12685 by cheyert
Replied by cheyert on topic Adding cust tabs for experience
Hi,

I figured out how to do this myself, so I will explain here. Based on the solution, I don't see why it takes the solidres team so long to come up with an updated version for Experience...

I wanted to have an extra tab called Tour Overview as a first tab, the second tab Description (which is the first tab in the ogirinal layout).
I needed to be able to edit this just like the Long Description under the General Information tab for an Experience in the administrator back-end

So here is what I did

Step 1.

Open the file
plugins/solidres/experience/administrator/components/com_solidres/models/forms/experience.xml

and search for description_long.

I copied those field lines, and renamed some lines with what I want (right beneath it,so)

<field
type="editor"
name="description_long"
label="SR_LONG_DESCRIPTION_LABEL"
description="SR_LONG_DESCRIPTION_DESC"
filter="safehtml"
buttons="true"/>
<field
type="editor"
name="tour_overview"
label="SR_TOUR_OVERVIEW_LABEL"
description="SR_TOUR_OVERVIEW_DESC"
filter="safehtml"
buttons="true"/>
/plugins/solidres/experience/language/en-GB/en-GB.plg_solidres_experience.ini

Step 2.
Open the file
plugins/solidres/experience/language/en-GB/en-GB.plg_solidres_experience.ini

And add those definitions to the ini file

SR_TOUR_OVERVIEW_LABEL="Tour Overview"
SR_TOUR_OVERVIEW_DESC="Tour Overview"
SR_TOUR_OVERVIEW="Tour Overview"

When you go to the experience administator back-end you will now see Tour Overview below the long description.

Step 3. Add column to sql table. The above might now give the extra tab/field in the administrator back-end, but when entering some data and then saving it, didn't work for tme. You need to add an additional column to the sql table.
The easiest step for me was to just go into phpmyadmin on the host server, and add it there.


Step 4. To display in front end
In the default.php file for the template (note I copied this into my templates directory to create a template override)
/templates/my_template/html/com_solidres/experience/default.php

Search for long-desc, somewhere around line 120 where the tabs begin, and then add

<?php echo JHtml::_('bootstrap.addTab', 'ExperienceDetail', 'expOverview', '<i class="fa fa-indent"></i> ' . JText::_('SR_TOUR_OVERVIEW_DESC', true)); ?>
<?php echo $this->item->tour_overview; ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>


After these 4 steps, it works like a charm...
Attachments:

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

More
5 years 2 months ago #12691 by solidres
Replied by solidres on topic Adding cust tabs for experience
Hi,

Thank you for sharing your code.

We will consider implement it for next releases, it is not yet implemented not because of the difficulties, it is simply because we are quite busy to work on more higher priority features.

Regards,

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

Moderators: solidres
Powered by Kunena Forum

All the things you need to make your work easier. Did you like Solidres?