Forum Support

Shape 5
March 28, 2024, 05:05:16 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Child theme  (Read 1257 times)
boyjpf1
Jr. Member
**
Offline Offline

Posts: 4



« on: November 27, 2015, 08:27:16 AM »

I have been asked to create some new template pages for a website running your Business Pro theme. Each attempt at creating new templates results in a
page full of Œvertex code errors.

Do you have a sample child theme you could send me to use as a base to develop the new templates?
Logged
Tristan Rineer
Global Moderator
*****
Offline Offline

Posts: 3858

Gravatar


« Reply #1 on: November 30, 2015, 07:49:15 AM »

Could you give more detail about what exactly you are trying to do?

The framework doesn't currently support page templates; this is due to the fact that by using something like Widget Context, you can have a completely different layout on every page just by showing or hiding widgets.  The themes and framework are designed to dynamically change the layout based on what widget positions are active on each page.

Child themes are also not currently supported, but all updates are done using the Vertex Upgrade Patch, which only changes framework files, nothing theme-specific; if you are concerned about losing customization and styling because of an update, you don't need to be.
Logged

Tristan Rineer
------------
Shape 5 Team



- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
boyjpf1
Jr. Member
**
Offline Offline

Posts: 4



« Reply #2 on: December 01, 2015, 05:34:11 AM »

Basically they want to integrate a third party api into the website to pull data via the api on to the page.

What we normally do is create a new template based on say page.php or a full width existing template and use this template to automatically connect to the api and display the jobs. We create two templates, a job search (containing a search form and paginated results) and a job detail (containing further details about the job and an application form).

How would you suggest we do this with the Business Pro theme?
Logged
Tristan Rineer
Global Moderator
*****
Offline Offline

Posts: 3858

Gravatar


« Reply #3 on: December 01, 2015, 12:40:05 PM »

If the code that you use rarely changes more than just the API key used to define which account information is displayed, I would actually recommend making a simple plugin with shortcodes for the 2 types of content.  Then, instead of having to create a custom page template on every site you do, all you would have to do is install & activate the plugin, then drop in the shortcodes.  Something like [job_search api=123456 /] and [job_listing api=123456 job_id=654321 /].

You can technically create a custom page template by duplicating the theme's index.php file and making your changes in the new file, but the amount of customization available to the framework requires the index to be very complex, which is why it hasn't been split into separate files like most themes have.  To separate out all the widget areas alone would end up requiring dozens of files.

If you haven't done shortcodes before, you can see the ones I've created for the framework in the vertex/includes/classes/shortcodes.class.php file.
Logged

Tristan Rineer
------------
Shape 5 Team



- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
boyjpf1
Jr. Member
**
Offline Offline

Posts: 4



« Reply #4 on: December 01, 2015, 01:14:42 PM »

Thanks Tristan, I have pondered setting up the system in that way but the amount of customisation each needs makes it a nightmare at present.

I'll play further with the index.php file, I had an hour or so before contacting you initially in the hope there may be a simple way but if there isn't then hey, not a problem.

Thanks for the help.
Logged
Tristan Rineer
Global Moderator
*****
Offline Offline

Posts: 3858

Gravatar


« Reply #5 on: December 02, 2015, 09:17:31 AM »

I'm glad I was able to help, sorry I couldn't do more.  Let me know if there's anything else you need.
Logged

Tristan Rineer
------------
Shape 5 Team



- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
Tristan Rineer
Global Moderator
*****
Offline Offline

Posts: 3858

Gravatar


« Reply #6 on: December 04, 2015, 08:53:43 AM »

I was just helping another member with a code adjustment and noticed that they had created a page template for a photo gallery.  After taking a quick look at the code I think I know what you'll need to do for yours.

As we thought, you'll want to make a copy of the index.php.  At that point, just look for the following:
Code:
<?php if ($s5_show_component == "yes") { ?>

Everything within that "if" can be replaced with the custom code you need for your page template.  I would actually recommend just replacing it with an include or require, and having your actual search/listing code in a separate file, just so it's easier for you to edit.

The only other thing you should need to do is put the standard page-template comment at the top of the file.
Logged

Tristan Rineer
------------
Shape 5 Team



- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.