[SOLVED] New views for the frontend

12 years 3 months ago - 12 years 3 months ago #187703 by apessoa
[SOLVED] New views for the frontend was created by apessoa
Hello

System:
J! 1.7.3
CB 1.7.1
All updated plugins


I'm trying to build new views for the profile edit, to be able to access each profile edit tab separately (meaning: just the fields from that tab, without displaying any other tab).

I know that Joomla MVC allows to do just that, by creating template/module/component overrides using instructions like:
"
JLoader::import('joomla.application.component.model');
JLoader::import( 'items', JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_comprofiler' . DS . 'models' );
$items_model = JModel::getInstance( Items', '...' );
$items_model->setState( 'id', $myItemId );
$items_model->get_item();
...
"

I checked my CB directories and couldn't find any views for the frontend, just for the backend.

Two questions:
- Does CB use the J! MVC or is it using something different?
- Is not using J! MVC, where can I find documentation and tutorials to create the new views?

Thanks in advance and best regards,
Alex

Please Log in to join the conversation.

12 years 3 months ago #187726 by krileon
Replied by krileon on topic Re: New views for the frontend

- Does CB use the J! MVC or is it using something different?

It uses MVC, but not Joomlas.

- Is not using J! MVC, where can I find documentation and tutorials to create the new views?

One doesn't exist because views are hardcoded; you can't extend them. It maybe possible with CB Content Bot and substitutions to render the Edit display of a tab in a Joomla article and thus giving it its own page. Example as follows.

[cb:usertab tab="##" user="#displayedOrMe" output="htmledit" /]

Replace ## with the ID of the tab you want to render. More on substitutions can be found within tutorials in my signature.


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.
The following user(s) said Thank You: pepperstreet

Please Log in to join the conversation.

12 years 3 months ago #187748 by apessoa
Replied by apessoa on topic Re: New views for the frontend
Hi Kyle

Thanks for the quick reply.

I've tried what you suggest with substitutions, but for some reason the CB Content Bot is not working, since I get the "[cb:usertab tab="34" user="#displayedOrMe" output="htmledit" /]" instead of the tab content.

I've disabled almost everything in my test site and am using the default J! 1.7 template, inserting the content without any editor and, of course, have the plugin enabled in Joomla.
I've tried using { and [, setting all permissions to public and nothing happends.

Site is in a WAMP, MySQL 5.1.23, PHP 5.3.4, Apache 2.2.17, all cache is off, all additional jquery plugins are off, the only changes to CB are CSS based and the Auto Actions you helped me build previously.

Can you suggest something to get it to work?

Best regards,
Alex

Please Log in to join the conversation.

12 years 3 months ago #187752 by krileon
Replied by krileon on topic Re: New views for the frontend

I've tried what you suggest with substitutions, but for some reason the CB Content Bot is not working, since I get the "[cb:usertab tab="34" user="#displayedOrMe" output="htmledit" /]" instead of the tab content.

When using CB Content Bot you need to surround all substitutions with {cb:}. Example as follows.

{cb:[cb:usertab tab="34" user="#displayedOrMe" output="htmledit" /]}


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.

12 years 3 months ago #187900 by apessoa
Replied by apessoa on topic Re: New views for the frontend
Hi Kyle

Thanks for the help :cheer: .

It is working now, although loosing formating. I'll try to tweak the template.



I have one additional question regarding nested tabs, but will open a new topic. Please consider this one solved.



Best Regards,
Alex

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.987 seconds

Facebook Twitter LinkedIn