Knowledgebase
View categorized listing of all common frequently asked questions.
Video Tutorials (jReviews 2.0)
Learn how to create a Movie & TV Show review website.
Learn how to start customizing the jReviews theme.
Forum
Community forum
Submit a Ticket
Use your client area email to access the ticket system.
Downloads
Guides, modules and more...
CSV Import for Joomla and jReviews
 
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2008, 01:30:30 PM
21282 Posts in 4854 Topics by 2794 Members
Latest Member: karate3029
News: Use your client area email when you sign up to the forum so we can identify you as a trial or licensed user. Otherwise we may not answer your questions.
 
jReviews Support Forum  |  jReviews 1.x  |  Tips & tricks  |  Tabs in Content Items « previous next »
Pages: 1 [2] 3 4 5
Author Topic: Tabs in Content Items  (Read 14007 times)
Gamersea
Full Member
***
Offline Offline

Posts: 84


« Reply #15 on: November 16, 2006, 02:29:21 PM »

Ok, I deleted the Joomlaworks one and installed the Jogadgets one no it seems that this one works better, However it still not working as you can see at the attachment you can see the fields tags but I have to be like here: http://softwaredb.net/index.php?option=com_content&task=view&id=75&Itemid=40

It should automaticly have the fieldgroups as tabs and under those tabs you can find the fields for that fieldgroup.


So, I think the code in the com_content.html is not correct.
Logged
Gamersea
Full Member
***
Offline Offline

Posts: 84


« Reply #16 on: November 16, 2006, 02:41:24 PM »

Ok, I got it working now but not as I want:
I have this code:
Quote
<patTemplate:tmpl name="com_content" visibility="show" varscope="jreviewcontent" unusedvars="strip">
<!--  com_content.html  -->
   <div id="JR_com_content">
      <div id="itemdescription" class="JR_description contentheading"><patTemplate:translate>_JR_DESCRIPTION</patTemplate:translate></div>

{jgtabber}

[tab ==Beschrijving==]
<patTemplate:link src="com_content_introimage" />
{INTROTEXT}
[/tab]

[tab ==Overige Informatie==]
{CUSTOMFIELDS}
[/tab]

  {/jgtabber}
     
</patTemplate:tmpl>

As you can see on the image
But I want that there comes a tab automaticly for each field group so automatic a tab for
Bedrijfsinformatie, a tab for Productaanbod , and a tab automatic for Webhosting mogelijkheden.

And at the games I want automatic tabs for those fieldsgroups.

same for shops automatic tabs for those fieldgroups so if I have the fieldgroup bedrijfsinformatie and a fieldgroup winkelinformatie  I want autmatic a tab for bedrijfsinformatie and one for winkelinformatie. Right now all the fieldgroups are under the same tab.
« Last Edit: November 16, 2006, 02:46:04 PM by Gamersea » Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8447


« Reply #17 on: November 16, 2006, 02:45:09 PM »

I am not a tabs expert and I have not tried any of these plugins. Having said that, you cannot have tabs for each field group unless you place all the fields by hand in your template and deselect the contentview option in the fields manager.

Always start simple. Try the tabs in content, even outside of jReviews and see if they work there, then put the same code in the com_content.hmtl template and see if it works there. Tab bot must come AFTER jReviews bot.

It MIGHT be possible to have tabs for each custom field if you change the customfields.html template:

{jgtabber}
   <patTemplate:tmpl name="group">
[tab =={GROUP_TITLE}==]
      <div id="JR_customfields-{CLASS}">
         <patTemplate:tmpl name="group.title" type="simplecondition" requiredvars="group_title" varscope="group">
            <div id="JR_group-{CLASS}">{GROUP_TITLE}</div>
         </patTemplate:tmpl>
            <patTemplate:tmpl name="row">
                  <patTemplate:tmpl name="custom.field" type="simplecondition" requiredvars="field_title" varscope="row">
                     <span id="JR_fieldtitle-{CLASS}">{FIELD_TITLE}</span>:
                  </patTemplate:tmpl>
                  <span id="JR_fieldvalue-{CLASS}">{FIELD_VALUE}</span><br />
            </patTemplate:tmpl>
      </div>
[/tab]

   </patTemplate:tmpl>
{/jgtabber}

I hope that helps.
« Last Edit: November 16, 2006, 02:48:41 PM by jReviews » Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Gamersea
Full Member
***
Offline Offline

Posts: 84


« Reply #18 on: November 16, 2006, 02:48:21 PM »

Will try that, Anyway it looks nicer and better now already.
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8447


« Reply #19 on: November 16, 2006, 02:49:13 PM »

I just edited the code above and put exactly what you should try. Let me know if it works.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Gamersea
Full Member
***
Offline Offline

Posts: 84


« Reply #20 on: November 16, 2006, 02:55:32 PM »

So I have this in my customfields.html :
Quote
<patTemplate:tmpl name="customfields" whitespace="trim">
<!--  customfields.html  -->
<div id="JR_customfields_outer-{CLASS}">
   {jgtabber}
   <patTemplate:tmpl name="group">
[tab =={GROUP_TITLE}==]
      <div id="JR_customfields-{CLASS}">
         <patTemplate:tmpl name="group.title" type="simplecondition" requiredvars="group_title" varscope="group">
            <div id="JR_group-{CLASS}">{GROUP_TITLE}</div>
         </patTemplate:tmpl>
            <patTemplate:tmpl name="row">
                  <patTemplate:tmpl name="custom.field" type="simplecondition" requiredvars="field_title" varscope="row">
                     <span id="JR_fieldtitle-{CLASS}">{FIELD_TITLE}</span>:
                  </patTemplate:tmpl>
                  <span id="JR_fieldvalue-{CLASS}">{FIELD_VALUE}</span><br />
            </patTemplate:tmpl>
      </div>
[/tab]
   </patTemplate:tmpl>
{/jgtabber}
   The other text of customfields.html no changes where made here so.

Replace the text what wat standing there first by the text you gave me, But then I get this error:  pat-Error Invalid closing tag pattemplate:tmpl, : expected in customfields.html on line 24
« Last Edit: November 16, 2006, 02:58:19 PM by Gamersea » Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8447


« Reply #21 on: November 16, 2006, 02:58:40 PM »

You have a lot of extra code there, use this and if it works please post the url or picture Smiley

Quote
<patTemplate:tmpl name="customfields" whitespace="trim">
<!--  customfields.html  -->
<div id="JR_customfields_outer-{CLASS}">
{jgtabber}
   <patTemplate:tmpl name="group">
[tab =={GROUP_TITLE}==]
      <div id="JR_customfields-{CLASS}">
         <patTemplate:tmpl name="group.title" type="simplecondition" requiredvars="group_title" varscope="group">
            <div id="JR_group-{CLASS}">{GROUP_TITLE}</div>
         </patTemplate:tmpl>
            <patTemplate:tmpl name="row">
                  <patTemplate:tmpl name="custom.field" type="simplecondition" requiredvars="field_title" varscope="row">
                     <span id="JR_fieldtitle-{CLASS}">{FIELD_TITLE}</span>:
                  </patTemplate:tmpl>
                  <span id="JR_fieldvalue-{CLASS}">{FIELD_VALUE}</span><br />
            </patTemplate:tmpl>
      </div>
[/tab]
   </patTemplate:tmpl>
{/jgtabber}
</div>
</patTemplate:tmpl>

<patTemplate:tmpl name="multiple_options">
   <patTemplate:tmpl name="option">
      <patTemplate:tmpl type="condition" conditionvar="image" varscope="option">
         <patTemplate:sub condition="noimage"><span id="JR_fieldvalue-{CLASS}">{TEXT}</span><patTemplate:tmpl name="separator" visibility="hidden">&nbsp;&#8226;</patTemplate:tmpl></patTemplate:sub>
         <patTemplate:sub condition="default">
            <IMG title="{TEXT}" alt="{TEXT}" src="{TEMPLATE_SITE}/{IMAGE}">&nbsp;
         </patTemplate:sub>
      </patTemplate:tmpl>
   </patTemplate:tmpl>
</patTemplate:tmpl>
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Gamersea
Full Member
***
Offline Offline

Posts: 84


« Reply #22 on: November 16, 2006, 03:03:15 PM »

It works kinda, But now it only shows the bedrijfsinformatie info.

by the way I changed this:
Quote
<patTemplate:tmpl name="group">
[tab =={GROUP_TITLE}==]
This one ^ is the second image
to this:
Quote
<patTemplate:tmpl name="group">
[tab=={GROUP_TITLE}==]
this ^ is the first image (no space between tab and ==
« Last Edit: November 16, 2006, 03:07:40 PM by Gamersea » Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8447


« Reply #23 on: November 16, 2006, 03:08:32 PM »

Ok, I know this is possible but I will have to download the bot to give you the final answer Cheesy
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Gamersea
Full Member
***
Offline Offline

Posts: 84


« Reply #24 on: November 16, 2006, 03:10:46 PM »

Ok, I know this is possible but I will have to download the bot to give you the final answer Cheesy
Ok, It's the Jogadgets bot

Update: On this moment with [tab =={GROUP_TITLE}==] code (so the wrong one I guess because the space)  you also have the reviews inside the tab:

Edit: Both the [tab =={GROUP_TITLE}==] code and the [tab=={GROUP_TITLE}==] code have the same problem as you can see on the image.
edit:  [tab =={GROUP_TITLE}==] is the good one, I just checked...
« Last Edit: November 16, 2006, 03:26:09 PM by Gamersea » Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8447


« Reply #25 on: November 16, 2006, 03:41:34 PM »

This is the code that works:

Quote
<patTemplate:tmpl name="customfields" whitespace="trim">
<!--  customfields.html  -->
{jgtabber}
<div id="JR_customfields_outer-{CLASS}">
   <patTemplate:tmpl name="group">
   [tab =={GROUP_TITLE}==]
      <div id="JR_customfields-{CLASS}">
         <patTemplate:tmpl name="group.title" type="simplecondition" requiredvars="group_title" varscope="group">
            <div id="JR_group-{CLASS}">{GROUP_TITLE}</div>
         </patTemplate:tmpl>
            <patTemplate:tmpl name="row">
                  <patTemplate:tmpl name="custom.field" type="simplecondition" requiredvars="field_title" varscope="row">
                     <span id="JR_fieldtitle-{CLASS}">{FIELD_TITLE}</span>:
                  </patTemplate:tmpl>
                  <span id="JR_fieldvalue-{CLASS}">{FIELD_VALUE}</span><br />
            </patTemplate:tmpl>
      </div>
   [/tab]
   </patTemplate:tmpl>
</div>
{/jgtabber}
</patTemplate:tmpl>

<patTemplate:tmpl name="multiple_options">
   <patTemplate:tmpl name="option">
      <patTemplate:tmpl type="condition" conditionvar="image" varscope="option">
         <patTemplate:sub condition="noimage"><span id="JR_fieldvalue-{CLASS}">{TEXT}</span><patTemplate:tmpl name="separator" visibility="hidden">&nbsp;&#8226;</patTemplate:tmpl></patTemplate:sub>
         <patTemplate:sub condition="default">
            <IMG title="{TEXT}" alt="{TEXT}" src="{TEMPLATE_SITE}/{IMAGE}">&nbsp;
         </patTemplate:sub>
      </patTemplate:tmpl>
   </patTemplate:tmpl>
</patTemplate:tmpl>
« Last Edit: November 16, 2006, 04:32:35 PM by jReviews » Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Gamersea
Full Member
***
Offline Offline

Posts: 84


« Reply #26 on: November 16, 2006, 03:52:35 PM »

Do I have to replace the whole code by this code? If not can you post the whole code just like you did 3 posts above?
As I am not sure what text I have to replace as I see like 3
</patTemplate:tmpl>
</patTemplate:tmpl>
</patTemplate:tmpl>

So I am not sure....

Thanks.
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8447


« Reply #27 on: November 16, 2006, 04:33:05 PM »

I edited my previous post to put the whole code in customfields.html
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8447


« Reply #28 on: November 16, 2006, 04:51:23 PM »

Unfortunately I just noticed that in the lists you see the raw code for the tabs or in blog content you see the tabs as well because the same template is used there and there. The only way to avoid this is to NOT show the custom fields in lists by unchecking the listview option in the fields manager.

You can always show the fields if you enter the tag {JR_FIELDNAME} or if it's a multiple choice field you enter the code posted in the templates forum.

The other thing you can do is what I said initially which is to build the whole tabs from scratch in your template putting the custom fields manually in the template.

Good luck!
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Gamersea
Full Member
***
Offline Offline

Posts: 84


« Reply #29 on: November 17, 2006, 01:14:01 AM »

hmm, Strange I changed the code in customfields.html but it's still the same.
By the way did you also change somethings in your com_content.html template things that I didn't changed because then I know that that is the problem if so could you also post or e-mail me your com_content.html template?

Thanks.
« Last Edit: November 17, 2006, 01:17:36 AM by Gamersea » Logged
Pages: 1 [2] 3 4 5
« previous next »
    Jump to: