Desktop productivity for business analysts and programmers

customize template sasweb

Reply
N/A
Posts: 0

customize template sasweb

Anyone knows how to create a new template based on sasweb? I want following be changed:

1)bordercolor=black, borderwidth=1;
2)change the indentation of table of contents, the default is too big.

Thanks in advance.Grace
SAS Super FREQ
Posts: 8,814

Re: customize template sasweb

Grace:
This example from Tech Support shows how to make a similar change (they are changing the left margin):
http://support.sas.com/faq/033/FAQ03306.html

In addition, this example from Tech Support shows how to make the borderwidth=7 --
http://support.sas.com/faq/033/FAQ03304.html
you would follow this example with 3 changes for the bordercolor (plus your changes for the TOC):
1) make the parent styles.sasweb
2) make borderwidth=1
3) add bordercolor=black

If you're sensing a theme here, you're right. Tech Support has the most WONDERFUL FAQ for ODS and templates. My only other suggestion is that you use an explicit path statement to store your templates (first lines of code) as shown below.

If you are doing this with EG, though, you may need help from Tech Support to figure out the best place to store the permanent copy of the template or to modify the ODS PATH statement for your system (since EG sometimes uses an EGTEMP libref for templates...or it used to).

Another alternative is to explore the possibilities of making all your changes in a CSS file. Tech Support would have to help you here or somebody else would have to chime in, because I don't honestly know for sure if you would need to make the FAQ tagset change for the contents indent changes if you were going the CSS route in EG.

Good luck!

cynthia

[pre]
ods path perm.newtemp(update)
sashelp.tmplmst(read);
** may need to put EG template store in above statement;

** use FAQ code to change tagset HTML4, and call it;
** tagsets.leftjusttoc and then ;

proc template;
define style styles.test;
parent=styles.sasweb;
style contentfolder from contentfolder /
leftmargin=0;
style contents from contents /
leftmargin=0;
style contentitem from contentitem /
leftmargin=3;
style contentprocname from contentprocname /
bullet=none
leftmargin=0;
style bycontentfolder from bycontentfolder;
leftmargin=0;
style Table from output /
Borderwidth=1
bordercolor=black ;
end;
run;


ods tagsets.leftjusttoc path="C:\temp"(url=none)
file="New_bod.html"
contents="New_TOC.html"
style=styles.test ;

proc whatever data=whatever;
run;
ods tagsets.leftjusttoc close;
[/pre]
N/A
Posts: 0

Re: customize template sasweb

Cynthia, this is wonderful. I get the margin partially worked. But the border still doesn't come out. I define frame=box, only that come out.

Where can I find all these references? Like which item define what?

Thanks much. You're always the best.
SAS Super FREQ
Posts: 8,814

Re: customize template sasweb

Grace:
Thanks. It's hard to diagnose in the forum because borderwidth has some interaction with the some of the other table attributes (like frame=) attribute. If you go to the SAS documentation and search for the string "Style Elements and Their Inheritances", you will find a useful table that talks about style elements and, if inheritance is involved, what element in the parent element. This table also lists the destinations in which a particular element is "respected" or supported. I LOVE the ODS documentation that's included with SAS 9.1.3 -- sometimes it may seem like a little hard to find, but I always follow this click path:
Inside SAS
Help --> SAS Help and Documentation
click on Contents tab
Expand SAS Products topic
Expand Base SAS topic
Expand Output Delivery System (ODS) topic
Expand The Template Procedure topic
Start Reading! (start with STYLES first)


But, the best thing for you do do is to contact Tech Support, where all the wonderful ODS folks can take a look at your WHOLE job (which is probably getting pretty lengthy by now) and help you tweak the attributes until it looks exactly the way you want it to look. To find out how to contact them, refer to:
http://support.sas.com/techsup/contact/index.html

Good luck!
cynthia
N/A
Posts: 0

Re: customize template sasweb

Cynthia, this is very helpful. Thanks much.
Ask a Question
Discussion stats
  • 4 replies
  • 148 views
  • 0 likes
  • 2 in conversation