emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Patch] HTML export -- Allow to change the name of the global DIV
@ 2011-03-10 13:07 Sébastien Vauban
  2011-03-11  8:37 ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Sébastien Vauban @ 2011-03-10 13:07 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

Hello,

Here is a patch which allows one to change the (currently) hard-coded DIV name
in which the page contents is being inserted.

It currently is "content", but some prefer "container" or "wrapper".

If accepted, my next patch will be to make this a per-project variable.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: add-variable-for-container-div.patch --]
[-- Type: text/x-patch, Size: 1130 bytes --]

diff --git a/lisp/org-html.el b/lisp/org-html.el
index c60c90d..772e9d0 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1,6 +1,6 @@
 ;;; org-html.el --- HTML export for Org-mode
 
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
@@ -583,6 +583,11 @@ with a link to this URL."
 	  (const :tag "Keep internal css" nil)
 	  (string :tag "URL or local href")))
 
+(defcustom org-export-content-div "content"
+  "The name of the container DIV that holds all the page contents."
+  :group 'org-export-htmlize
+  :type 'string)
+
 ;;; Hooks
 
 (defvar org-export-html-after-blockquotes-hook nil
@@ -1251,7 +1256,7 @@ lang=\"%s\" xml:lang=\"%s\">
 %s
 </head>
 <body>
-<div id=\"content\">
+<div id=\"%s\">
 %s
 "
 		 (format
@@ -1268,6 +1273,7 @@ lang=\"%s\" xml:lang=\"%s\">
 		 date author description keywords
 		 style
 		 mathjax
+		 org-export-content-div
 		 (if (or link-up link-home)
 		     (concat
 		      (format org-export-html-home/up-format

[-- Attachment #3: Type: text/plain, Size: 50 bytes --]


Best regards,
  Seb

-- 
Sébastien Vauban

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-03-14 15:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-10 13:07 [Patch] HTML export -- Allow to change the name of the global DIV Sébastien Vauban
2011-03-11  8:37 ` Bastien
2011-03-11  9:09   ` Sébastien Vauban
2011-03-14 13:11   ` Matt Lundin
2011-03-14 15:22     ` Jambunathan K
2011-03-14 15:25       ` Jambunathan K

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).