Pliant documentation forum
On the syntax of the .page commands
Here we try to clarify the syntax and semantics of the .page commands (aka html_tag's) |
Message posted by marcus on 2003/06/20 00:21:38 |
in the 'link' tag, what is the semantics of the attribute 'no_extension'? |
Message posted by marcus on 2003/07/04 19:57:34 |
Regarding the .page instruction 'common', what is the semantics of the paremeters url_icon, has_html4, and hidden |
Message posted by hubert.tonneau on 2003/07/06 09:08:41 |
'common' is not a real tag.
The HtmlStack data type is used to be abble to push and pull efficiently the value of each attribute for each tag. HtmlStack mainly provide the ability for the styling functions to test the value of each attribute efficiently. So, in facts, common is a tag which is only defined to create some more attibutes that the styling functions need.
Looking at the code, you can see that the attibutes for 'common' tag are 'bgcolor' 'url_icon' and 'has_html4'
'hidden' means this is not a real tag, so you cannot use common in a .page
In order to set these parameters, you could use lines like these in the 'Style options' field of the site definition: common bgcolor (color rgb 255 255 255) common url_icon "/mysite/icon/the_url_icon.png"
It seems that the URL icon must be a 16 x 16 pixels image. They are also additional constrains under IE.
Alternatively, you can use something like this in a .page file:
module "/pliant/protocol/http/style/common.pli" style push common bgcolor (color rgb 255 255 255) push common url_icon "/mysite/icon/the_url_icon.png"
The 'style' instruction in a .page with a bloc under it instead of the name of a module is a new feature that enables to order a .page to execute some of it's code early (before starting to send the page content to the browser)
Lastly, you can define a new .style and write something like this there: style_setup push common bgcolor (color rgb 255 255 255) push common url_icon "/mysite/icon/the_url_icon.png"
Last point, has_html4 is used to decide if the client browser is accepting advanced HTML 4 rendering (the HTML 'style' attribute) or will better work with HTML 3.2 way of specifying things. |
Message posted by maybe Hubert Tonneau on 2003/07/13 23:53:14 |
> in the 'link' tag, what is the semantics of the attribute 'no_extension'?
A sad feature from the past.
In early versions of Pliant, I planned to have HTML/HTTP maybe only as one of the possible user interfaces in the futur, with the same .page syntax on Pliant side.
So, if the current page is http://mysite/menu.html then a link to http://mysite/part1/page1.html can be specified as: link "my link" "part1/page1.html"
Also, the '.html' looked to much HTML oriented to me, so I decided to allow to specify it as: link "my link" "part1/page1" with Pliant automatically adding '.html'
The problem is that it prooves to general more problems than it solve, because if the target is truely 'http://mysite/part1/page1' then Pliant will try to add '.html'
So, I had to add the attribute 'no_extension' to prevent automatically adding '.html' so that you can now link to 'http://mysite/part1/page1' through: link "my link" "part1/page1" no_extension
|
Message posted by maybe Marcus on 2003/09/16 14:31:20 |
What is the semantic difference between the commands
goto_url
and
execute_dynamic_page |
Message posted by hubert.tonneau on 2003/09/16 20:11:12 |
'goto_url' means asks the brower to jump to the new URL.
'execute_dynamic_page' means execute the code of the specified page, and include it in the current one. It is basically a call to a subroutine. |