veeara282 / instant-press

Open source CMS for the Web2Py framework
GNU General Public License v2.0
4 stars 4 forks source link

sidebar-links also disabled when sidebar-paged disabled #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What is the problem?
In file /instantpress/models/_aconfig.py from instantpress_beta6.zip:

if set PAGES_ENABLED = False
then both sidebar-page and sidebar-links are disappeared.
But we don't want to disable sidebar-links.

--------------------------------
I have checked the source code in instantpress/modules/widgets.py,
and fix the bug. First search 'sidebar_links' and then modify a function like 
below:

def sidebar_links(self):
....
change
    if config.pages_enabled:
to
    if config.links_enabled:
...

and add some codes in /instantpress/models/_aconfigcheck.py
like:

class Config(object)
...
    def set_links_enabled(self, enabled):#add this function
        self.links_enabled = enabled
....

i2pConfig.set_links_enabled(LINKS_ENABLED) #call it

Finally, in file /instantpress/models/_aconfig.py add a line :
LINKS_ENABLED = True
near
PAGES_ENABLED = False
================
That's all. Please update the source code!
Thanks Mulone Martin and other contributors for the instant-press blog.
Here is my site: http://alwin-tsui.appspot.com

Original issue reported on code.google.com by alwinT...@gmail.com on 29 Dec 2010 at 6:43

GoogleCodeExporter commented 9 years ago
Thanks Alwin, and sorry for the late response.

Original comment by mulone.m...@gmail.com on 10 Jan 2011 at 11:58