Single_Page Included In Package Not Working
Permalink
Hi,
I am trying to create a very simple package with one single page. The directory structure is shown below. Company Model has not been used in company controller. My code for displaying company single_page is very simple.. just a text. The package installs successfully but single page text is not being displayed.
If i put company single page in my webroot(/var/www/html/xxxxxxxx/single_pages) directory. Voila it works.
Can you please help me in tracing what i am doing wrong because of which single page content is not working within the package.
.
|-- controller.php
|-- controllers
| `-- company.php
|-- db.xml
|-- models
| `-- company.php
`-- single_pages
`-- company.php
Company - Single page
I am trying to create a very simple package with one single page. The directory structure is shown below. Company Model has not been used in company controller. My code for displaying company single_page is very simple.. just a text. The package installs successfully but single page text is not being displayed.
If i put company single page in my webroot(/var/www/html/xxxxxxxx/single_pages) directory. Voila it works.
Can you please help me in tracing what i am doing wrong because of which single page content is not working within the package.
.
|-- controller.php
|-- controllers
| `-- company.php
|-- db.xml
|-- models
| `-- company.php
`-- single_pages
`-- company.php
Company - Single page
This is the install() method for your package controller (so the one that lives at /packages/your_package/controller.php).
If you don't want to uninstall and reinstall the package you can also put this code in the upgrade() function, but you'll have to maek sure you increase your package version number ($pkgVersion).
Hope that helps!