Forum OpenACS Development: Re: HTML body properties

Collapse
4: Re: HTML body properties (response to 3)
Posted by Antonio Pisano on
Noticed now the forum swallowed my markup in the message. Glad you could make it anyway! 😊

All the best

Collapse
5: Re: HTML body properties (response to 4)
Posted by Gustaf Neumann on
The forum "swallows" markup today the same way as these are doing over the last 10 years. The author of the posting has to take care about potential markup, since certain tags are allowed in the posting tag. The least surprises are if one uses "HTML" as format. People tend to get spoiled by other tools (like xowiki), where one does not have these kind of problems.

i've fixed up you posting above.
-g

Collapse
6: Re: HTML body properties (response to 5)
Posted by Iuri Sampaio on
Hi Gustaf,

I barely understood your statement. Does it mean if I use xowiki I won't face such scenarios? If so, how then would I easily assign classes and CSS style such as the one in queston.

To summarize I need to write sort of
<body class="login" >
and the css is

.login{background-image: url(background-login.jpg); background-position:center; background-size:cover;}

Best wishes,

Collapse
7: Re: HTML body properties (response to 6)
Posted by Gustaf Neumann on
my reply was to Antonio: the good old edit widget has several input modes (including "enhanced text" or "HTML"). These modes determine, how OpenACS processes the user input. These modes allow the user to input markup (e.g. &lt;strong&gt;.... &lt;/strong&gt; or &lt;master&gt;) which is influencing the rendering of the posting. In this message, i did not type '&lt;', 's', 't', 'r', 'o', 'n', 'g', '&gt;', but '&amp;', 'l', 't', ';', 's', 't', 'r', 'o', 'n', 'g', '&amp;', 'g', 't', ';' to the the text literally into the posting. When the text is input without escaping, it is interpreted by the browser; in the case of Antonio's posting, the markup was not shown at all. ....

If one enters a text with a HTML like markup in e.g. a rich-text widget, the literal text is automatically translated into proper markup.

Concerning "your" problem - which is not clearly described: If you want to add attributes to the HTML body element, do what Antonio said. If you want to tailor the login/register page (i am guessing based on the ".login" class) define a .tcl/.adp pair and specify it via the package parameter LoginTemplate for acs-subsite. In the .adp file, you can use the property "head" to define, whatever you need (see e.g. [1]) and/or you can use the template::head API [2] from the .tcl part to load extra .css or whatever.

[1] https://openacs.org/api-doc/content-page-view?source_p=1&path=/packages/acs-api-browser/www/proc-view.adp
[2] https://openacs.org/api-doc/procs-file-view?path=packages/acs-templating/tcl/head-procs.tcl