Jump to content
  • 0

Custom Theme/template


medfordite

Question

Since 3.0 I haven't seen where we can build a new template that sits as default for the customer other than copying the existing one, renaming the default to something else and then making the the new one the default. 

 

What I am wanting to do is start doing an integration into Wordpress, not in the way that has been suggested before, but more in a of "wrapping" the content, while I know this isn't a good way for SEO or Responsiveness, this is a pet project of mine to see if it can be done. :)  As part of this, I am wanting to strip out Blesta's top menu, and create links in WP of my own for the customer when they are logged in.  This would help make it more "Fluid" in the whole design aspect.

 

The next thing I want to do is strip out the top logo and "Return to Portal" and "LogOut" button, so basically we would have the Client area's contents embedded in the "Wrapper".  I am aware of the whole API call setup and so forth for Blesta and that there is a Work in Progress right now for some integration into Wordpress, but again, a pet project of mine and API just doesn't really make sense to me anyway, I've tried and never gotten the hang of it. 

 

Is there a way to call the custom client template/views that I create with the stripped out menu etc  from an external source like WordPress?  In other words - something like http://www.example.com/blesta/?template=custom  

 

I don't want to start mashing around with the customizations and make them default. 

 

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

I looked at that and while I know it is still a work in progress, I was trying to move away from having the Blesta Menu as part of the integration as shown in their demos.   I worked on it quite a bit last night and have nailed down quite a bit of integration to my liking, but am now at the main question of being able to call up the modified template by URL if at all possible.

 

The modified template will have the menu stripped out, logo stripped out "Return to Portal and LogOut" removed.

Link to comment
Share on other sites

  • 0

There's a couple tasks slated for 3.2 related to custom interfaces, one is:

 

CORE-961 - Add ability to select view for client interface per company. This would allow you to clone an existing set of views, customize them, then choose which company to render the customizations for.

Link to comment
Share on other sites

  • 0

Cody -

 

This is good to see.  But in the mean time until 3.2 comes out:

 

Is there a way to call the custom client template/views that I create with the stripped out menu etc  from an external source like WordPress?  In other words - something like http://www.example.c...template=custom

 

This is what I am wanting to attempt (Mocked up somewhat - I already have it embedded via a Wrapper and the menu at the moment is a copy/paste until I integrate that part). 

 

mock1.png

 

 

Edited by medfordite
Link to comment
Share on other sites

  • 0

Update /app/views/clients/default/structure.pdt and use PHP to only show that nav if the GET parameter template is not "custom". Setting it to custom will then hide the nav.

 

                <?php
                if ($this->Html->ifSet($logged_in) && $this->Html->ifSet($_GET['template']) != "custom") {
                ?>
                <section class="outer_nav">
                    <section class="layout">
                    ....
                <?php
                }
                ?>
Link to comment
Share on other sites

  • 0

I tried that - but...it blanked out my client area upon page load for some reason.

 

If I have my custom template view in a directory called "cdefault" in the /app/views/client/    Is there an easier way to call that particular view from a hyperlink once the client is logged in?   I am wanting to have both views available.  One for those clients who wish to log in with a unified view and the others who have my main directory bookmarked right now for billing.  

Link to comment
Share on other sites

  • 0

I tried that - but...it blanked out my client area upon page load for some reason.

 

If I have my custom template view in a directory called "cdefault" in the /app/views/client/    Is there an easier way to call that particular view from a hyperlink once the client is logged in?   I am wanting to have both views available.  One for those clients who wish to log in with a unified view and the others who have my main directory bookmarked right now for billing.  

 

You have to use conditional logic within the structure.pdt file as in my example. If you receive a blank page it's probably due to a syntax error.

Link to comment
Share on other sites

  • 0

If I have my custom template view in a directory called "cdefault" in the /app/views/client/    Is there an easier way to call that particular view from a hyperlink once the client is logged in?   I am wanting to have both views available.  One for those clients who wish to log in with a unified view and the others who have my main directory bookmarked right now for billing.  

Okay - Can we address this question then?

 

I still haven't gotten a direct answer from anyone about this and am suspecting it isn't possible. 

Link to comment
Share on other sites

  • 0

Okay - Can we address this question then?

 

I still haven't gotten a direct answer from anyone about this and am suspecting it isn't possible. 

 

The answer to your question is unequivocally no.

 

Is there an easier way to call that particular view from a hyperlink once the client is logged in?

 

But like I said, you can accomplish the same thing using conditional logic placed in the structure.pdt file similar to what I showed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...