Hello!
First of all thanks for great CMS ! Everything is fine, but one thing that imho should be added in next releases is support for custom pages. I can do it via Information Module and then link the page with heading menu but then that page will be also visible in Information box. What I am trying to acomplish is to create new custom page and link it with head menu (custom page with breadcumb and box with title, not entirely new page). Is there some fast way to do this ?
First of all thanks for great CMS ! Everything is fine, but one thing that imho should be added in next releases is support for custom pages. I can do it via Information Module and then link the page with heading menu but then that page will be also visible in Information box. What I am trying to acomplish is to create new custom page and link it with head menu (custom page with breadcumb and box with title, not entirely new page). Is there some fast way to do this ?
OK, I think I found solution. If anybody had similar problem here is the answer (only front-end):
Step 1:
Create folder structure for Controller, View and Language layer
Controller: catalog/controller/custom
View: catalog/view/theme/default/template/custom
Language: catalog/language/custom
Step 2:
Put files with desired name to each folder, in my example it is 'serwis'
Controller: catalog/controller/custom/serwis.php
View: catalog/view/theme/default/template/custom/serwis.tpl:
Language: catalog/language/english/custom/serwis.php:
Step 3:
Change 'serwis' to desired name (filename and inside files), 'default' to your template name and 'english' to your language folder.
Step 4:
Modify variable 'heading_title in language file to set title of page and box.
Modify variable 'heading_text' in language file and put heading content for your custom page.
You can easly create new variables and put more content.
Step 5:
Put link to your new custom page anywhere you want, in my example it will be: index.php?route=custom/serwis
Thats all.
Step 1:
Create folder structure for Controller, View and Language layer
Controller: catalog/controller/custom
View: catalog/view/theme/default/template/custom
Language: catalog/language/custom
Step 2:
Put files with desired name to each folder, in my example it is 'serwis'
Controller: catalog/controller/custom/serwis.php
Code: Select all
<?php
class ControllerCustomSerwis extends Controller {
public function index() {
$this->language->load('custom/serwis');
$this->document->title = $this->language->get('heading_title');
$this->document->breadcrumbs = array();
$this->document->breadcrumbs[] = array(
'href' => $this->url->http('common/home'),
'text' => $this->language->get('text_home'),
'separator' => FALSE
);
$url = '';
if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}
$this->document->breadcrumbs[] = array(
'href' => $this->url->http('custom/serwis' . $url),
'text' => $this->language->get('heading_title'),
'separator' => $this->language->get('text_separator')
);
$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['heading_text'] = $this->language->get('heading_text');
$this->id = 'content';
$this->template = $this->config->get('config_template') . 'custom/serwis.tpl';
$this->layout = 'common/layout';
$this->render();
}
}
?>
Code: Select all
<div class="top">
<h1><?php echo $heading_title; ?></h1>
</div>
<div class="middle">
<div><?php echo $heading_text; ?></div>
</div>
<div class="bottom"> </div>
Code: Select all
<?php
// Heading
$_['heading_title'] = 'Serwis i usługi';
//Content
$_['heading_text'] = 'Welcomeeee';
?>
Change 'serwis' to desired name (filename and inside files), 'default' to your template name and 'english' to your language folder.
Step 4:
Modify variable 'heading_title in language file to set title of page and box.
Modify variable 'heading_text' in language file and put heading content for your custom page.
You can easly create new variables and put more content.
Step 5:
Put link to your new custom page anywhere you want, in my example it will be: index.php?route=custom/serwis
Thats all.
Last edited by filippo on Wed Sep 09, 2009 8:34 pm, edited 1 time in total.
I created a CMS System addon for OpenCart that will do a bit more
- Categorized Topics
- Custom Sidebox module
- Categories can be external links
- Articles are displayed CMS style with read more for full story
- Enable/Disable Categories
- Custom SEO controller
- Related Articles
DEMO: http://unbannable.com/v132/index.php?ro ... ory&path=2
DOWNLOAD: http://www.unbannable.com/ocstore/cms
- Categorized Topics
- Custom Sidebox module
- Categories can be external links
- Articles are displayed CMS style with read more for full story
- Enable/Disable Categories
- Custom SEO controller
- Related Articles
DEMO: http://unbannable.com/v132/index.php?ro ... ory&path=2
DOWNLOAD: http://www.unbannable.com/ocstore/cms
Is this available/compatible with the new version (1.4.0)Qphoria wrote:I created a CMS System addon for OpenCart that will do a bit more
- Categorized Topics
- Custom Sidebox module
- Categories can be external links
- Articles are displayed CMS style with read more for full story
- Enable/Disable Categories
- Custom SEO controller
- Related Articles
DEMO: http://unbannable.com/v132/index.php?ro ... ory&path=2
DOWNLOAD: http://www.unbannable.com/ocstore/cms
Hello,
Thanks for the post. I know it's been a while since the original post was created, but I'm attempting creating a custom page in 1.4.9.4. I tried using the code provided, but I get the following error:
line 11:
catalog/controller/custom/help.php:
Any insight would be greatly appreciated.
Thanks for the post. I know it's been a while since the original post was created, but I'm attempting creating a custom page in 1.4.9.4. I tried using the code provided, but I get the following error:
Code: Select all
Fatal error: Call to a member function http() on a non-object in /home/clover13/public_html/store/catalog/controller/custom/help.php on line 11
Code: Select all
'href' => $this->url->http('common/home'),
Code: Select all
<?php
class ControllerCustomHelp extends Controller {
public function index() {
$this->language->load('custom/help');
$this->document->title = $this->language->get('heading_title');
$this->document->breadcrumbs = array();
$this->document->breadcrumbs[] = array(
'href' => $this->url->http('common/home'),
'text' => $this->language->get('text_home'),
'separator' => FALSE
);
$url = '';
if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}
$this->document->breadcrumbs[] = array(
'href' => $this->url->http('custom/help' . $url),
'text' => $this->language->get('heading_title'),
'separator' => $this->language->get('text_separator')
);
$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['heading_text'] = $this->language->get('heading_text');
$this->id = 'content';
$this->template = $this->config->get('config_template') . 'custom/help.tpl';
$this->layout = 'common/layout';
$this->render();
}
}
?>
If you just want to create a page you could always make a new "Information" page in Admin and then set the sort order to -1 so it doesn't show up the the Information box (if this is what you want).
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
I get also error message
Fatal error: Call to undefined method Url::http() in /catalog/controller/ on line 10
How can I fix it?
Bert regards,
Chris
Fatal error: Call to undefined method Url::http() in /catalog/controller/ on line 10
Code: Select all
'href' => $this->url->http('common/home'),
Bert regards,
Chris
For the opencart 1.5.2.1... I fixed some problem
catalog\controller\custom\serwis.php change to as follow...
catalog\controller\custom\serwis.php change to as follow...
Code: Select all
<?php
class ControllerCustomSerwis extends Controller {
public function index() {
$this->language->load('custom/serwis');
$this->document->setTitle($this->language->get('heading_title'));
$this->document->breadcrumbs = array();
$this->document->breadcrumbs[] = array(
'href' => $this->url->link('common/home'),
'text' => $this->language->get('text_home'),
'separator' => FALSE
);
$url = '';
if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}
$this->document->breadcrumbs[] = array(
'href' => $this->url->link('custom/serwis' . $url),
'text' => $this->language->get('heading_title'),
'separator' => $this->language->get('text_separator')
);
$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['heading_text'] = $this->language->get('heading_text');
$this->id = 'content';
$this->template = $this->config->get('config_template') . '/template/custom/serwis.tpl';
$this->layout = 'common/layout';
$this->response->setOutput($this->render());
}
}
?>
I wrote a pretty comprehensive answer on SO about this for 1.5.x
http://stackoverflow.com/questions/9490 ... 28#9491028
http://stackoverflow.com/questions/9490 ... 28#9491028
Hi I'm also setting this up but receive this error:
Can anybody help with this. Thanks.
Code: Select all
Fatal error: Class 'Controllerlandingpagewty' not found in /home/www/public_html/websitename/vqmod/vqcache/vq2-system_engine_front.php on line 45
Website Design, hosting, seo and online marketing visit: http://www.yorkcreative.co.uk
check the class ControllerLandingPagewty exist.
Thanks for the fix! 

Website Design, hosting, seo and online marketing visit: http://www.yorkcreative.co.uk
Hi does anyone know hot to add a rewrite to the .htaccess file to direct a forward slash domain address to redirect to the ?route=landingpage/wty address so I can simplify the custom page link for publications/advertising etc?
Thanks for your help.
Thanks for your help.
Website Design, hosting, seo and online marketing visit: http://www.yorkcreative.co.uk
Who is online
Users browsing this forum: No registered users and 41 guests