Custom CB Template

7 years 9 months ago - 7 years 9 months ago #283865 by MAYASIMA
Custom CB Template was created by MAYASIMA
I created a custom template and set it as the template to be used in the CB configuration. Everything works as should (I changed some css, images etc....), except for when I make changes to the default.php file. For example:

I CHANGED:
if ( $this->registerTitle ) {
				$return		.=			''
							.				'' . $this->registerTitle . ''
							.			'';
			}
TO:
if ( $this->registerTitle ) {
				$return		.=			''
							.				'' . $this->registerTitle . ''
							.			'';
			}
Cannot enter the exact code as for some reason it is stripping tags... Anyway bottom line, the only change I made was a heading tag, from h3 to h1

This should put the title of the CB registration page between h1 tags but when visiting the CB registration page it does not get updated and instead the tags are still h3. I checked all kinds of issues (caching etc...) to no avail. Can this be a bug?

Please Log in to join the conversation.

7 years 9 months ago #283876 by krileon
Replied by krileon on topic Custom CB Template
Were the class names of your template named properly? The PHP file should be the same name as your template and the classes in it also have the name of the template in them. If it can't find those it'll fallback to default.

So for example if your template name is "mytemplate" you'd have "mytemplate.php" and its PHP class would be "CBListView_html_mytemplate"/


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

7 years 9 months ago #283892 by MAYASIMA
Replied by MAYASIMA on topic Custom CB Template
Aaaargh, I knew that one. Thanks for reminding me. Other question: Can I also customize the "Lost your Username or your Password?" view in my custom template? (I can't find it) Thx!

Please Log in to join the conversation.

7 years 9 months ago #283903 by krileon
Replied by krileon on topic Custom CB Template
Unfortunately no, many of the frontend views are hardcoded into comprofiler.html.php. What exactly are you wanting to change? It maybe possible to use CB Auto Actions combined with jQuery in a Code action inserted on the page to modify it or CSS if it's just styling changes.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

7 years 9 months ago #283912 by MAYASIMA
Replied by MAYASIMA on topic Custom CB Template
I just want to change the title tag from h3 to h1

Please Log in to join the conversation.

7 years 9 months ago #283938 by krileon
Replied by krileon on topic Custom CB Template
I would just override its style then. Don't see a reason to have to maintain a bunch of PHP code for a style change. You can do this with the following selector.

.cbLostPassForm .page-header h3

You would then just style that selector with whatever CSS is being applied to h1.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.241 seconds