Knowledge Base

How to fix a element

on Sunday 11 August 2019
comments: 0

Problem:  URL on 4 Coloured boxes doesn't work. 

Steps (general steps for any problem with elements):

1. find used keys 

- check options setting (mode) - for MindFeatures elements is mindfeatures, so you will look for the file with this name

- check template setting - default template key is mindfeatures.

You can get that information directly from shortcode:

{ELEMENTS: mode=mindfeatures&template=mindfeatures}

The mode value is code value (the unique name for the group of data). More elements can use the same option settings (if they use the same fields). 

2. open option file

- the path is always your theme folders/elements/options_mode.php, so in this case it's openmind/elements/options_mindfeatures.php

- check the name of needed fields, in this case, it is item_button and item_url  

Note: We try to use the same names for similar fields in  (section_ for header, item_ for items) but there could be older elements sometimes with different keys.

All used (editable) fields have key inuse as true, so there could be more fields but you don't see them in the admin area because they are not used (it saves time with developing new elements or their reusing with new theme)

It's good practice to insert relevant shortcode to the title, so you can copy shortcode directly from admin area. 


3. open template file

it uses standard template path (theme folder/templates/jmelements/)

find mindfeatures keys

Problem is there we forgot there hardcoded code and nobody noticed this until now.

<a href="#" class="btn btn-success pull-right">Read more</a>

Just replace this line with relevant shortcodes

<a href="{ITEM_URL}" class="btn btn-success pull-right">{ITEM_BUTTON}</a>

and it's fixed.

This will be fixed in the next release of OpenMind theme.