Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #639084

    Bonitto D
    Participant

    Hi,

    I was attempting to create a somewhat complex tabbed element and I have Advanced Controls turned on however there is not a field for id, however there is one for class. Was this purposefully omitted? Thanks.

    #639151

    Nico
    Moderator

    Hi There,

    Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    Thanks.

    #643129

    Bonitto D
    Participant

    Tabbed Content is a shortcode that you offer in Theme X. One of the attributes that you say is available is assigning an ID to each tab. http://theme.co/x/demo/integrity/1/shortcodes/tabbed-content/ However my problem is that in Cornerstone you do not provide an ID field (when you turn on Advanced Options) for each tab when you select it as an element. You only offer a class field. So my question is how do I assign an id to each tabbed element because I’d like to assign an id to each tab.

    #643498

    Jade
    Moderator

    Hi there Bonitto,

    The ID and style options are purposely disabled in Cornerstone for Tabbed Content. If you want to be able to add IDs, you can use the shortcodes version instead.

    Hope this helps.

    #643561

    Bonitto D
    Participant

    Darn it. So I assume there’s no way to turn on this feature within Cornerstone? It would seem somewhat counterintuitive that the other elements have ID’s but this one doesn’t? Or possibly add it as an update in the future.

    #643757

    Bonitto D
    Participant

    Actually I figured out how to add it in Cornerstone. If anyone wants to know, you will need to locate the tabs.php and tab.php file located in the /plugins/cornerstone/elements/modules/ directory.

    In tab.php do the following:

        navigate to line 11 or the line of code that has the word ‘supports’ and modify it to reflect the code below:

        'supports'    => array(  'id', 'class' ),
        
        Save the file

    In tabs.php do the following:

      After line 49 add the following code:

      $this->addSupport( 'id',
            array( 'options' => array( 'monospace' => true ) )
          );
      Go to the Tab nav items comment and change the code to reflect the following:

       $tabs_nav_extra = $this->extra( array(
           'id'    =>; $e['id'],
           'class' =>; $e['class']
         ) );
      Go to the Tabs comment section and change the code to reflect the following:

      $tabs_extra = $this->extra( array(
              'id'    => $e['id'],
              'class' => $e['class']
            ) );
      Save the file

    Please do note that this is a modification to core Cornerstone files. More than likely when it updates all changes will be lost. I am not responsible for any issues you encounter after modification but figured it would be helpful since it’s not too complicated.

    #643854

    Jade
    Moderator

    Hi there Bonitto,

    Thanks for sharing your workaround and pointing out the warning that any changes on the core files will be lost when the plugin is updated. As for making it available in Cornerstone by default is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive. Thanks!

    #645015

    Bonitto D
    Participant

    No problem. Thank you guys for being innovators!

    Honestly, I think any element/shortcode that you guys offer in your example should have the exact functionality in Cornerstone because that’s what we’ll be looking for. It just seems counter-intuitive that you’d purposely omit those options and when we go to use them, they’re not there.

    #645387

    Jade
    Moderator

    Hi Bonitto,

    We appreciate the feedback, we will look into this and if there is enough demand we might add it in a future release. Cheers! 🙂