Browse Source

HTML export -- Allow to change the name of the global DIV

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.
Best regards,
  Seb
Sébastien Vauban 14 years ago
parent
commit
f72541f824
1 changed files with 8 additions and 2 deletions
  1. 8 2
      lisp/org-html.el

+ 8 - 2
lisp/org-html.el

@@ -1,6 +1,6 @@
 ;;; org-html.el --- HTML export for Org-mode
 ;;; 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.
 ;;   Free Software Foundation, Inc.
 
 
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
@@ -605,6 +605,11 @@ with a link to this URL."
 	  (const :tag "Keep internal css" nil)
 	  (const :tag "Keep internal css" nil)
 	  (string :tag "URL or local href")))
 	  (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
 ;;; Hooks
 
 
 (defvar org-export-html-after-blockquotes-hook nil
 (defvar org-export-html-after-blockquotes-hook nil
@@ -1278,7 +1283,7 @@ lang=\"%s\" xml:lang=\"%s\">
 %s
 %s
 </head>
 </head>
 <body>
 <body>
-<div id=\"content\">
+<div id=\"%s\">
 %s
 %s
 "
 "
 		 (format
 		 (format
@@ -1295,6 +1300,7 @@ lang=\"%s\" xml:lang=\"%s\">
 		 date author description keywords
 		 date author description keywords
 		 style
 		 style
 		 mathjax
 		 mathjax
+		 org-export-content-div
 		 (if (or link-up link-home)
 		 (if (or link-up link-home)
 		     (concat
 		     (concat
 		      (format org-export-html-home/up-format
 		      (format org-export-html-home/up-format