[Pier] Questions from a newbie concerning value links...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Pier] Questions from a newbie concerning value links...

han27

Dear all,

 

I’m using PIER 2.0 in order to develop a small webpage. After playing around with it for a while many concepts becomes clear. However there still things I’m struggling with.

 

One of these issues are the value links: On a page with some text structured by sections (using “!”) I would like to use something like “+value:toc+” to have a kind of menu in order to refer directly to specific sections in the text. The +value:toc+ exactly fulfills my needs but the rendering looks a bit strange: It creates an unordered list with ordered entries. That means I have a list items beginning with a bullet followed by a number before the heading of section appears…

 

I already tried other constructs such as “children” etc. Can anybody give me an advice how render the “value:toc” without having bullets and numbers at the same. The best solution would be to have neither bullets nor numbers…

 

Many thanks in advance for your help.

 

Best wishes

 

Carl

 


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: [Pier] Questions from a newbie concerning value links...

Gastón Dall' Oglio
Hello.

Look at method PRValueLink>>tocIn: and you see that PRTocRenderer is responsible of it :) Then look at PRTocRenderer>>visitHeader: and you see that 'toc-number' is rendered. Maybe you can inherited PRTocRenderer in PRMyTocRenderer and reimplement that you need.

Finally, made your value version:


mytocIn: aContext
 <value: 'mytoc' comment: 'Display the table of contents of the current structure, my version :) .'>
^ self lookupStructure: aContext structure do: [ :structure | [ :html |
  PRMyTocRenderer new 
    start: structure
    in: html painter
    on: html ] ]


or add a parameter to the existing #tocIn: method:


mytocIn: aContext
 <value: 'mytoc' comment: 'Display the table of contents of the current structure, my version :) .'>
^ self lookupStructure: aContext structure do: [ :structure | [ :html |
     (self hasParameter: 'mytoc')
        ifTrue: [
           PRMyTocRenderer new 
               start: structure
               in: html painter
               on: html ] 
        ifFalse: [
           PRTocRenderer new 
              start: structure
              in: html painter
              on: html ] ] ]


and use like this: +value:toc|mytoc+

It seems a lot of work to extend Pier classes, but is simple and allows you to do many things.

HTH

2012/9/20 Carl Hans <[hidden email]>

Dear all,

 

I’m using PIER 2.0 in order to develop a small webpage. After playing around with it for a while many concepts becomes clear. However there still things I’m struggling with.

 

One of these issues are the value links: On a page with some text structured by sections (using “!”) I would like to use something like “+value:toc+” to have a kind of menu in order to refer directly to specific sections in the text. The +value:toc+ exactly fulfills my needs but the rendering looks a bit strange: It creates an unordered list with ordered entries. That means I have a list items beginning with a bullet followed by a number before the heading of section appears…

 

I already tried other constructs such as “children” etc. Can anybody give me an advice how render the “value:toc” without having bullets and numbers at the same. The best solution would be to have neither bullets nor numbers…

 

Many thanks in advance for your help.

 

Best wishes

 

Carl

 


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: [Pier] Questions from a newbie concerning value links...

Gastón Dall' Oglio
use and use like this: +value:mytoc|mytoc+ :)

2012/9/20 Gastón Dall' Oglio <[hidden email]>
Hello.

Look at method PRValueLink>>tocIn: and you see that PRTocRenderer is responsible of it :) Then look at PRTocRenderer>>visitHeader: and you see that 'toc-number' is rendered. Maybe you can inherited PRTocRenderer in PRMyTocRenderer and reimplement that you need.

Finally, made your value version:


mytocIn: aContext
 <value: 'mytoc' comment: 'Display the table of contents of the current structure, my version :) .'>
^ self lookupStructure: aContext structure do: [ :structure | [ :html |
  PRMyTocRenderer new 
    start: structure
    in: html painter
    on: html ] ]


or add a parameter to the existing #tocIn: method:


mytocIn: aContext
 <value: 'mytoc' comment: 'Display the table of contents of the current structure, my version :) .'>
^ self lookupStructure: aContext structure do: [ :structure | [ :html |
     (self hasParameter: 'mytoc')
        ifTrue: [
           PRMyTocRenderer new 
               start: structure
               in: html painter
               on: html ] 
        ifFalse: [
           PRTocRenderer new 
              start: structure
              in: html painter
              on: html ] ] ]


and use like this: +value:toc|mytoc+

It seems a lot of work to extend Pier classes, but is simple and allows you to do many things.

HTH

2012/9/20 Carl Hans <[hidden email]>

Dear all,

 

I’m using PIER 2.0 in order to develop a small webpage. After playing around with it for a while many concepts becomes clear. However there still things I’m struggling with.

 

One of these issues are the value links: On a page with some text structured by sections (using “!”) I would like to use something like “+value:toc+” to have a kind of menu in order to refer directly to specific sections in the text. The +value:toc+ exactly fulfills my needs but the rendering looks a bit strange: It creates an unordered list with ordered entries. That means I have a list items beginning with a bullet followed by a number before the heading of section appears…

 

I already tried other constructs such as “children” etc. Can anybody give me an advice how render the “value:toc” without having bullets and numbers at the same. The best solution would be to have neither bullets nor numbers…

 

Many thanks in advance for your help.

 

Best wishes

 

Carl

 


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki



_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: [Pier] Questions from a newbie concerning value links...

Gastón Dall' Oglio
One thing more, you can hide the bullets in a li tag using css:

li {
    list-style-type: none;
}

In method PRStructure>>defaultEnvironment there is a good reference of css classes used in Pier.

2012/9/20 Gastón Dall' Oglio <[hidden email]>
use and use like this: +value:mytoc|mytoc+ :)


2012/9/20 Gastón Dall' Oglio <[hidden email]>
Hello.

Look at method PRValueLink>>tocIn: and you see that PRTocRenderer is responsible of it :) Then look at PRTocRenderer>>visitHeader: and you see that 'toc-number' is rendered. Maybe you can inherited PRTocRenderer in PRMyTocRenderer and reimplement that you need.

Finally, made your value version:


mytocIn: aContext
 <value: 'mytoc' comment: 'Display the table of contents of the current structure, my version :) .'>
^ self lookupStructure: aContext structure do: [ :structure | [ :html |
  PRMyTocRenderer new 
    start: structure
    in: html painter
    on: html ] ]


or add a parameter to the existing #tocIn: method:


mytocIn: aContext
 <value: 'mytoc' comment: 'Display the table of contents of the current structure, my version :) .'>
^ self lookupStructure: aContext structure do: [ :structure | [ :html |
     (self hasParameter: 'mytoc')
        ifTrue: [
           PRMyTocRenderer new 
               start: structure
               in: html painter
               on: html ] 
        ifFalse: [
           PRTocRenderer new 
              start: structure
              in: html painter
              on: html ] ] ]


and use like this: +value:toc|mytoc+

It seems a lot of work to extend Pier classes, but is simple and allows you to do many things.

HTH

2012/9/20 Carl Hans <[hidden email]>

Dear all,

 

I’m using PIER 2.0 in order to develop a small webpage. After playing around with it for a while many concepts becomes clear. However there still things I’m struggling with.

 

One of these issues are the value links: On a page with some text structured by sections (using “!”) I would like to use something like “+value:toc+” to have a kind of menu in order to refer directly to specific sections in the text. The +value:toc+ exactly fulfills my needs but the rendering looks a bit strange: It creates an unordered list with ordered entries. That means I have a list items beginning with a bullet followed by a number before the heading of section appears…

 

I already tried other constructs such as “children” etc. Can anybody give me an advice how render the “value:toc” without having bullets and numbers at the same. The best solution would be to have neither bullets nor numbers…

 

Many thanks in advance for your help.

 

Best wishes

 

Carl

 


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki




_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

AW: [Pier] Questions from a newbie concerning value links...

han27

Dear Gastón,

many thanks for your tips. The problems are solved.

Best wishes

Carl


-----Ursprüngliche Nachricht-----
Von: [hidden email] im Auftrag von Gastón Dall' Oglio
Gesendet: Do 20.09.2012 15:55
An: Magritte, Pier and Related Tools ...
Betreff: Re: [Pier] Questions from a newbie concerning value links...
 
One thing more, you can hide the bullets in a li tag using css:

li {
    list-style-type: none;
}

In method PRStructure>>defaultEnvironment there is a good reference of css
classes used in Pier.

2012/9/20 Gastón Dall' Oglio <[hidden email]>

> use and use like this: +value:mytoc|mytoc+ :)
>
>
> 2012/9/20 Gastón Dall' Oglio <[hidden email]>
>
>> Hello.
>>
>> Look at method PRValueLink>>tocIn: and you see that PRTocRenderer is
>> responsible of it :) Then look at PRTocRenderer>>visitHeader: and you see
>> that 'toc-number' is rendered. Maybe you can inherited PRTocRenderer
>> in PRMyTocRenderer and reimplement that you need.
>>
>> Finally, made your value version:
>>
>>
>> mytocIn: aContext
>>  <value: 'mytoc' comment: 'Display the table of contents of the current
>> structure, my version :) .'>
>> ^ self lookupStructure: aContext structure do: [ :structure | [ :html |
>>   PRMyTocRenderer new
>>     start: structure
>>     in: html painter
>>     on: html ] ]
>>
>>
>> or add a parameter to the existing #tocIn: method:
>>
>>
>> mytocIn: aContext
>>  <value: 'mytoc' comment: 'Display the table of contents of the current
>> structure, my version :) .'>
>> ^ self lookupStructure: aContext structure do: [ :structure | [ :html |
>>      (self hasParameter: 'mytoc')
>>         ifTrue: [
>>            PRMyTocRenderer new
>>                start: structure
>>                in: html painter
>>                on: html ]
>>         ifFalse: [
>>            PRTocRenderer new
>>               start: structure
>>               in: html painter
>>               on: html ] ] ]
>>
>>
>> and use like this: +value:toc|mytoc+
>>
>> It seems a lot of work to extend Pier classes, but is simple and allows
>> you to do many things.
>>
>> HTH
>>
>> 2012/9/20 Carl Hans <[hidden email]>
>>
>>> Dear all,
>>>
>>>
>>>
>>> I'm using PIER 2.0 in order to develop a small webpage. After playing
>>> around with it for a while many concepts becomes clear. However there still
>>> things I'm struggling with.
>>>
>>>
>>>
>>> One of these issues are the value links: On a page with some text
>>> structured by sections (using "!") I would like to use something like
>>> "+value:toc+" to have a kind of menu in order to refer directly to specific
>>> sections in the text. The +value:toc+ exactly fulfills my needs but the
>>> rendering looks a bit strange: It creates an unordered list with ordered
>>> entries. That means I have a list items beginning with a bullet followed by
>>> a number before the heading of section appears.
>>>
>>>
>>>
>>> I already tried other constructs such as "children" etc. Can anybody
>>> give me an advice how render the "value:toc" without having bullets and
>>> numbers at the same. The best solution would be to have neither bullets nor
>>> numbers.
>>>
>>>
>>>
>>> Many thanks in advance for your help.
>>>
>>>
>>>
>>> Best wishes
>>>
>>>
>>>
>>> Carl
>>>
>>>
>>>
>>> _______________________________________________
>>> Magritte, Pier and Related Tools ...
>>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>>>
>>
>>
>

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

winmail.dat (6K) Download Attachment