Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Condition on result page (front end )
(1 viewing) (1) Guest
"ARI Stream Quiz" WordPress plugin
Go to bottomPage: 1
TOPIC: Condition on result page (front end )
#66609
Condition on result page (front end ) 4 Years, 1 Month ago Karma: 0
Hi Ari,

Plugin is great and working fine. We just need a little help/guidance on how we can possibly achieve this in the front end results page. We are comfortable editing plugin files.

We wanted to show a different content in the front end result page instead of using the content from the personality content option. The code can be manually added so no need to add custom field in the backend. All we need is how we can create a condition using the result of the quiz.

The personality front end result page are rendered with this code

{{$global}}
<div class="quiz-title"><?php echo $quiz->quiz_title; ?></div>
{{$resultPersonalities}}
<div class="quiz-result-item quiz-result-item{{@index}}">
<div class="result-title"><?php echo Settings::get_option( 'share_personality_title' ); ?></div>
<?php if ($only_main_personality_content): ?>{{#if !@index}}<?php endif; ?>
{{#if image}}
<div class="result-image {{image_class}}" data-image-credit="{{image_credit}}">{{image}}</div>
{{/if}}
<div class="result-content">{{content}}</div>
<?php if ($only_main_personality_content): ?>{{/if}}<?php endif; ?>
</div>
{{/resultPersonalities}}
{{/global}}


We need a little customization to this template so we can display the custom text we wanted to show. We wanted to create a condition something like this

if( {{title}} == 'personality1' ){
}else if( {{title}} == 'personality2' ){
}

Apparently we can't create that condition as the {{title}} can't be compared.

Can you guide us how we can possibly achieve that? of some alternative if you can suggest.

Thank you so much
The administrator has disabled public write access.
 
#66610
Re:Condition on result page (front end ) 4 Years, 1 Month ago Karma: 748
Hello,

It needs to extend template engine to add support of expressions in "if" statement. Currently it supports only simple boolean value.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#66611
Re:Condition on result page (front end ) 4 Years, 1 Month ago Karma: 0
Thanks for your prompt response.

Ok I understand. How about I add another fields in the personality option, how can I show it in the results page ( front end )?

At the moment, personality only has the Content option. We will add another field in there, how can we show it in the results template (front end)?

Thank you
The administrator has disabled public write access.
 
#66612
Re:Condition on result page (front end ) 4 Years, 1 Month ago Karma: 0
Do you also do customization to the plugin? If yes, can you give an estimate for this...

It needs to extend template engine to add support of expressions in "if" statement. Currently it supports only simple boolean value.

Thank you
The administrator has disabled public write access.
 
Go to topPage: 1