I wish to customize the main_template of plone 4.1 to prevent mouse selection and drag. Don't know where exactly and how to do it in the body tag. Also need a simple and quick reference for learning TAL, TALES, METAL. Something for beginners. Please guide. I wish to prevent copy/paste form the browser. I have customized it for the file preview but unable to do the same for the main_template.
How to customize the body tag for TAL in plone main_template equivalent to "ondragstart="false"?
362 Views Asked by user956424 At
2
There are 2 best solutions below
0
djay
On
The simplest way to customize the body tag is to install plone.app.theming. It is easier to understand, can be done through the web and is more likely to remain compatible through upgrades. It is compatible with Plone 4.1 and included in 4.3.
Related Questions in PYTHON
- How to store a date/time in sqlite (or something similar to a date)
- Instagrapi recently showing HTTPError and UnknownError
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
- Python Geopandas unable to convert latitude longitude to points
- Influence of Unused FFN on Model Accuracy in PyTorch
- Seeking Python Libraries for Removing Extraneous Characters and Spaces in Text
- Writes to child subprocess.Popen.stdin don't work from within process group?
- Conda has two different python binarys (python and python3) with the same version for a single environment. Why?
- Problem with add new attribute in table with BOTO3 on python
- Can't install packages in python conda environment
- Setting diagonal of a matrix to zero
- List of numbers converted to list of strings to iterate over it. But receiving TypeError messages
- Basic Python Question: Shortening If Statements
- Python and regex, can't understand why some words are left out of the match
Related Questions in PLONE
- Remove all jobs from plone.app.async queue
- How to add view access to members in plone
- Plone Error After Migration: KeyError('language',)
- Exporting data from a .fs file. Plone 3.3.5
- How do I create a plone and volto project
- Manually start plone 6 instance inside docker container
- Plone 6 Volto generate app - Cannot find module 'is-ci'
- Pressing Enter key on input field does not work as expected
- Couldn't find index page for 'ploneconf.site' (maybe misspelled?)
- Python Could not import class
- Finding all views/namespace urls in a Zope3 system?
- Is it possible to add a if condition inside tal:define?
- Buildout - Allow hosts for package download
- Modify or clean form input in zope or plone
- Rename Dexterity object (id) after copy
Related Questions in TEMPLATE-TAL
- How can I make a "FOR"(loop) in html, using chameleon and pyramid in python 3.4?
- Any way to suppress key errors when a dictionary key is not found in Chameleon ZPT templates?
- Tal condition string contains
- TAL Condition in Plone to hide HTML if it's a Document (Page)
- Why is a variable defined outside a fill-slot or define-macro element not visible inside this element?
- Save a subdomain name to String
- How to create zebra-stripe CSS with TAL?
- Configurable head with chameleon load
- How do I conditionally add a class to a block item inside a repeat loop with Chameleon
- Using tal:repeat variable in tal:condition, Chameleon
- How to check if string exists in template?
- Storing data in HTML tags as custom attributes
- Accessing view reference in TAL with "python" namespace prefix
- How to select option in HTML select using TAL in ZPT?
- Pyramid Chameleon Tal:condition 'Not' issue
Related Questions in ZPT
- alpine.js with Zope Page Templates
- Chameleon/TAL/ZPT template problem in tal:repeat
- tal:condition for file attachment fields
- How to search content using a date range on Plone
- Writing a angularjs directive which initializes the model of a select box by finding the selected option
- Repeat contents of plone pages from a folder in viewlet
- Pyramid Chameleon template security for HTML and Javascript
- TAL Condition in Plone to hide HTML if it's a Document (Page)
- Localization in Pyramid ZPT Chameleon Template
- How can I loop through subgroups of an OrderedDict in ZPT?
- Why is a variable defined outside a fill-slot or define-macro element not visible inside this element?
- Save a subdomain name to String
- How to create zebra-stripe CSS with TAL?
- Zope Page Templates: calling a macro from a macro
- How to check if string exists in template?
Related Questions in TEMPLATE-METAL
- Can I nest multiple template objects inside another chameleon template?
- How to add a prefix string to a TAL:attribute repeat index command?
- Why is a variable defined outside a fill-slot or define-macro element not visible inside this element?
- Configurable head with chameleon load
- Zope Page Templates: calling a macro from a macro
- How to print unclosed tags in PHPTAL Macros
- How to use HTML5 Boilerplate in a ZPT?
- Zope (ZPT) overlapping tags
- how to use macros with pyramid / ZPT (Chameleon)
- Rendering nested elements with an arbitrary depth using Chameleon ZPT
- How do you specify the html5 doctype with Python Chameleon?
- Chameleon template global variables
- How to customize the body tag for TAL in plone main_template equivalent to "ondragstart="false"?
- Pyramid framework and master templates / master page / partial views
- How to use template inheritance with Chameleon?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If you are adding a simple
ondragstart="false"attribute, you don't need any knowledge of TAL, TALES or METAL.TAL is a XML-aware templating language, it uses namespaces and XML attributes to 'blend in' into the template structure. As such, you can add extra attributes to tags outside of the TAL-specific attributes.
Simply customize the
main_templatefile and add the attribute to the body tag:If you still want to read up on TAL, TALES and METAL, you can read the Zope 2 book, chapter 10: Using Zope Page Templates, chapter 13: Advanced Page Templates and appendix C: Zope Page Templates Reference.