Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com/collective/collective.devel…
Browse files Browse the repository at this point in the history
…opermanual
  • Loading branch information
Mikko committed Mar 19, 2012
2 parents a58b345 + 0d0c60a commit cd27872
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 3 deletions.
4 changes: 3 additions & 1 deletion source/components/grok.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ Example::
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:grok="http://namespaces.zope.org/grok"
i18n_domain="plonetheme.xxx">


<include package="five.grok" />

<five:registerPackage package="." initialize=".initialize" />

<!-- Grok the package to initialise schema interfaces and content classes -->
Expand Down
2 changes: 1 addition & 1 deletion source/misc/commandline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ and portal_skins skin layers::
return makerequest(app)

# Enable Faux HTTP request object
app= spoofRequest(app)
app = spoofRequest(app)

# Get Plone site object from Zope application server root
site = app.unrestrictedTraverse("yoursiteid")
Expand Down
8 changes: 8 additions & 0 deletions source/misc/email.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,11 @@ modules (particularly ``Products.remember.tools.registration``).
If you don't need to have third parties to override your email templates
it might be cleaned to use Python string templates, as XML based TAL
templates are not designed for plain text templating.

Graceful failing
--------------------

In the case SMTP server rejects the connection. etc. don't abort the current transaction (which is
the default behavior)

* http://stackoverflow.com/questions/9013009/ploneformgen-and-fail-safe-email-send
10 changes: 9 additions & 1 deletion source/serving/traversing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ Use getPhysicalPath(). Example::
Getting virtual path
====================

For content items you can use ``absolute_url_path()`` from `Traversable <http://svn.zope.org/Zope/trunk/src/OFS/Traversable.py?rev=122638&view=auto>`_::

path = context.absolute_url_path()

Map physical path to virtual path using HTTP request object physicalPathToVirtualPath(). Example::

request = self.request # HTTPRequest object
Expand Down Expand Up @@ -294,10 +298,14 @@ Example::
portal_url = getToolByName(context, "portal_url")
portal = portal_url.getPortalObject()

You can also do shortcut using acquisition (not recommended if you can avoid this)::
You can also do shortcut using acquisition::

portal = context.portal_url.getPortalObject()

.. note ::

Application code should use the getToolByName method, rather than simply
acquiring the tool by name, to ease forward migration (e.g., to Zope3).

Using getSite()
====================
Expand Down
18 changes: 18 additions & 0 deletions source/templates_css_and_javascripts/javascript.txt
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,24 @@ Conditional comments (IE)

* http://plone.org/products/plone/roadmap/232a

Upgrading jQuery
------------------

``jquery.js`` lives in *Products.CMFPlone* ``portal_skins/plone_3rdparty/jquery.js``.
Plone 4.1 ships with compressed jQuery 1.4.4.

Here are instructions to change jQuery version. Please note that this may
break Plone core functionality (tabs, overlays).

These instructions also apply if you want to enable debug version (non-compressed)
jQuery on your site.

* Download new jQuery from http://docs.jquery.com/Downloading_jQuery and save it to your local disk

* In ZMI, go to plone_3rdparty, customize jquery.js

* Upload new jQuery from your hard disk

Having multiple jQuery versions (noConflict)
-----------------------------------------------

Expand Down

0 comments on commit cd27872

Please sign in to comment.