I'm trying to create a new view here. I'm not able to render a certain template. I'm following the below given steps. I'd be glad if anyone could help me out as I would like to explore more as to how these views and viewlets work.
I've created a new add-on by using the command mrbob mrbob:plonetheme.tango
I've created a views.py file with the following code in it from zope.interface import Interface from Products.Five.browser import BrowserView from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile class MyView(BrowserView): index = ViewPageTemplateFile("myview.pt")
3.Then I've added a template myview.pt in /plonetheme/tango/browser/templates/myview.pt
4.I've registered the template in browser/configure.zcml.
Here is the code:
`
<metal:block fill-slot="content-core">
XXX - this text comes below title and description
</metal:block>
`
When I go to this site,
https://localhost/Plone/@@myview
It says that the page does not exist.
Don't know where I'm going wrong. I would appreciate it if you could help me out.
Thanks for the pointers! Now, I have all of this inside an add-on. I've mentioned in the buildout.cfg under the [eggs] section. When I try to update buildout by using the command bin/buildout on the command line I get such an error: Setting socket time out to 3 seconds. While: Installing. Getting section mrbob. Initializing section mrbob. Getting option mrbob:backups-dir. Error: Referenced option does not exist: buildout var-dir
What might be the prominent issue?
What could be a possible alternative to register the plone add-on ?
Because when I navigate to this url http://localhost/Plone/@@test
I get the following error:
Are you 'just trying to add some views and viewlets' or are you working with (improving) bobtemplates?
Bobtemplates is used for 'making stuff without coding too much', but after you have used it to make your theme, your add-on (etc) you dont need to think about it anymore.
After that, you should have an add on that you can put in your 'src' folder and add it to the 'eggs' and 'src' sections of your buildout.
Also: I dont think you want to call you add-on 'plonetheme.tango' (as an add on with this name already exists, so you might want to change the name to 'plonetheme.mytheme' ?
I'm trying to help improve bobtemplates.plone (referring to one of the gsoc ideas) .As a primer, I'm trying to explore how to create views and browserviews and get acquainted with their practices.
And yes, I will surely change the name for the add-on.
Can you guide me in contributing for the idea ? What would be steps involved in integrating missing templates such as view,viewlets,portlets,tiles etc.. into bobtemplates? I would be glad if you could help me out.