HighDots Forums  

editable attributes in templates: 2 ?s

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss editable attributes in templates: 2 ?s in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
threeandcats
 
Posts: n/a

Default editable attributes in templates: 2 ?s - 07-02-2004 , 03:48 PM






Q1: I'd like to be able to remove a link from a text button in pages made from
a template. But I want the text itself locked. I was able to remove the link
info with editable attributes, but I'm left with <a href = "">text on
button</a> so the text button still acts like a live link. Can I use editable
attributes or some other method to remove the link tag or make it inactive?

Q2: Also using a template, I'd like to be able to edit the height and width
of a colored layer without changing anything else about the layer. Using
editable attributes, I could only figure out how to make the changes via the
entire info for the style tag, making everything but the div id editable and
defeating my purpose. Is there a way to change just the height and width of my
layer in the child pages of the template?

Any help appreciated--this has been driving me nuts for the last couple of
days while this forum was down. I'm a newbie, so explanations of advice would
be wonderful. Thanks in advance!


Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: editable attributes in templates: 2 ?s - 07-02-2004 , 04:00 PM






threeand:

See below -

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"threeandcats" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Q1: I'd like to be able to remove a link from a text button in pages made
from
a template. But I want the text itself locked. I was able to remove the
link
info with editable attributes, but I'm left with <a href = "">text on
button</a> so the text button still acts like a live link. Can I use
editable
attributes or some other method to remove the link tag or make it
inactive?

I would use a conditional expression in the form of an if-then-else test,
e.g.,

@@(linkit=="yes"?"<a href='foo.html'>FOO</a>":"FOO")@@

On the page in question, setting the parameter called linkit to yes will
write the link to the page, and setting it to no will not. Of course, you
need to have defined the parameter in the head -

<!-- TemplateParam name="linkit" type="text" value="yes" -->

Quote:
Q2: Also using a template, I'd like to be able to edit the height and
width
of a colored layer without changing anything else about the layer. Using
editable attributes, I could only figure out how to make the changes via
the
entire info for the style tag, making everything but the div id editable
and
defeating my purpose. Is there a way to change just the height and width
of my
layer in the child pages of the template?
Sure - use an embedded stylesheet in the editable region in the head of the
child page - it couldn't possibly be simpler!

Quote:
Any help appreciated--this has been driving me nuts for the last couple
of
days while this forum was down. I'm a newbie, so explanations of advice
would
be wonderful. Thanks in advance!
You're welcome. Let me know if you need more explanation.

Quote:



Reply With Quote
  #3  
Old   
threeandcats
 
Posts: n/a

Default Re: editable attributes in templates: 2 ?s - 07-02-2004 , 06:00 PM



Hi Murray,

Thanks for your answer. I think I get the general idea, but more explanation
would really help .

<!-- TemplateParam name="linkit" type="text" value="yes" -->
I'm guessing this goes in the head of my template and shows up as editable in
the child document, where I enter "yes" for value to have the link, and "no"
for no link.

Also, if I want to do this for five different buttons, I just repeat this
statement five times with different names eg
<!-- TemplateParam name="linkit1" type="text" value="yes" --><!--
TemplateParam name="linkit2" type="text" value="no" --> and so forth.

@@(linkit=="yes"?"<a href='foo.html'>FOO</a>":"FOO")@@
Where does this go in the template? Does it replace the link tag <a href =
"/my/link">text for clicking</a>?
Does it translate to mean "if there is a "yes" typed in the Template Param
called linkit in the head of this child page, then the link to foo.html that is
attached to the text FOO should be replaced with the unlinked text FOO on this
page"?

"Sure - use an embedded stylesheet in the editable region in the head of the
child page - it couldn't possibly be simpler!"
Even that's not simple for me ! Is an embedded stylesheet what I get when I
click apply to this document only in the new CSS style dialog box? If the
layer is locked, how do I apply a style to it in the child page? Or do I apply
the style to the layer in the template, then just change the height and width
in the stylesheet of the child page? If so, don't I need an embedded style
sheet to define the style in the template also? To set a style for height and
width of a layer, do I use the box section of the class dialog box?

Please pardon my ignorance and many thanks for your help!!



Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: editable attributes in templates: 2 ?s - 07-02-2004 , 06:29 PM



three:

See below -

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"threeandcats" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi Murray,

Thanks for your answer. I think I get the general idea, but more
explanation
would really help .

!-- TemplateParam name="linkit" type="text" value="yes" --
I'm guessing this goes in the head of my template and shows up as
editable in
the child document, where I enter "yes" for value to have the link, and
"no"
for no link.
Yes - it's editable using MODIFY | Template Properties in any child page.

Quote:
Also, if I want to do this for five different buttons, I just repeat this
statement five times with different names eg
!-- TemplateParam name="linkit1" type="text" value="yes" --><!--
TemplateParam name="linkit2" type="text" value="no" --> and so forth.
Yes.

Quote:
@@(linkit=="yes"?"<a href='foo.html'>FOO</a>":"FOO")@@
Where does this go in the template? Does it replace the link tag <a href
=
"/my/link">text for clicking</a>?
Yes.

Quote:
Does it translate to mean "if there is a "yes" typed in the Template
Param
called linkit in the head of this child page, then the link to foo.html
that is
attached to the text FOO should be replaced with the unlinked text FOO on
this
page"?
Just the opposite. If the value is yes, then the link around FOO is shown.
If it's no, then the link is not shown, and FOO remains unlinked, plain
text.

Quote:
"Sure - use an embedded stylesheet in the editable region in the head of
the
child page - it couldn't possibly be simpler!"
Even that's not simple for me ! Is an embedded stylesheet what I get
when I
click apply to this document only in the new CSS style dialog box?
Very good!

Quote:
If the
layer is locked, how do I apply a style to it in the child page?
By defining the ID selector for the layer in the embedded stylesheet, e.g.,

STYLESHEET -

<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
#foo { yourstyleshere; }
-->
</style>
<!-- InstanceEndEditable -->

BODY -

<div id="foo">Foo content</div>

You will have to make sure that the inline styles that are part of the div
tag's styles do NOT conflict with those you are defining in the embedded
stylesheet. The easy way to do this is to make sure that the styles for
that "layer" are completely specified in a linked or embedded stylesheet
that is mentioned BEFORE the one in the Editable Region.

Quote:
Or do I apply
the style to the layer in the template, then just change the height and
width
in the stylesheet of the child page? If so, don't I need an embedded
style
sheet to define the style in the template also? To set a style for height
and
width of a layer, do I use the box section of the class dialog box?

Please pardon my ignorance and many thanks for your help!!
I hope the explanation above helps.

Quote:




Reply With Quote
  #5  
Old   
threeandcats
 
Posts: n/a

Default Re: editable attributes in templates: 2 ?s - 07-02-2004 , 09:06 PM



Ahhhh, that's better--you've solved both of my problems. Thank you, thank
you!! It took me a few tries, but every time I got stuck I'd read your answers
again and voila, there would be the info on how to get unstuck. I really
appreciate the clarity and detail since my knowledge of HTML is based solely on
clicking something in DW and watching what happens in the code window.

Three more questions:

Can you recommend a book on HTML that could take me from the basics to stuff
like what you just explained?

How do I access news://forums.macromedia.com/macromedia.dreamweaver ?

Is there some insider reason for using "foo" to represent my names for things
?

Thanks again!


Reply With Quote
  #6  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: editable attributes in templates: 2 ?s - 07-02-2004 , 09:49 PM



three:

Quote:
I really
appreciate the clarity and detail
Thank you - and you're welcome!

Quote:
Can you recommend a book on HTML that could take me from the basics to
stuff
like what you just explained?
These are my favorites. I don't think you would go wrong just getting the
first and last of these, but those in between are mighty useful as well. In
addition, all of the authors hang out here, so you can ask them when you
have questions! 8)

Dreamweaver MX 2004: The Missing Manual - by David Sawyer McFarland
http://www.amazon.com/exec/obidos/tg/detail/-/0596006314/qid=1074863466//ref=sr_8_xs_ap_i2_xgl14/102-1685038-4464901?v=glance&s=books&n=507846

Depending on your technical expertise, the following could become one of
your most useful references -

Dreamweaver MX 2004 Bible - by Joseph Lowery
http://www.amazon.com/exec/obidos/tg/detail/-/0764543504/qid=1074863444//ref=sr_8_xs_ap_i8_xgl14/102-1685038-4464901?v=glance&s=books&n=507846

Dreamweaver MX 2004: The Complete Reference, Second Edition
http://www.amazon.com/exec/obidos/tg/detail/-/0072229438/qid=1074863710//ref=sr_8_xs_ap_i10_xgl14/102-1685038-4464901?v=glance&s=books&n=507846

And finally, you will *definitely* want this one once you get to speed!

Dreamweaver MX 2004 Magic - by Massimo Foti, Angela Buraglia, and Dan Short
(with help from their friends)
http://www.amazon.com/exec/obidos/tg/detail/-/0735713782/qid=1074863444//ref=sr_8_xs_ap_i10_xgl14/102-1685038-4464901?v=glance&s=books&n=507846

In addition, I can't praise this one highly enough -

http://www.projectseven.com/foundations/index.htm

For templates, you might get some useful info here -

http://www.dreamweavermx-templates.com


--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"threeandcats" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Ahhhh, that's better--you've solved both of my problems. Thank you, thank
you!! It took me a few tries, but every time I got stuck I'd read your
answers
again and voila, there would be the info on how to get unstuck. I really
appreciate the clarity and detail since my knowledge of HTML is based
solely on
clicking something in DW and watching what happens in the code window.

Three more questions:

Can you recommend a book on HTML that could take me from the basics to
stuff
like what you just explained?

How do I access news://forums.macromedia.com/macromedia.dreamweaver ?

Is there some insider reason for using "foo" to represent my names for
things
?

Thanks again!




Reply With Quote
  #7  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: editable attributes in templates: 2 ?s - 07-02-2004 , 09:50 PM



Oh - sorry - more....

You access the NNTP forum using a newsreader. I use OutlookExpress on
WXPPro. Set your Read Messages number up to about 1000, and have a ball.
No more sluggish screens....

Quote:
Is there some insider reason for using "foo" to represent my names for
things
?
No - it's short and generic. 8)

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"threeandcats" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Ahhhh, that's better--you've solved both of my problems. Thank you, thank
you!! It took me a few tries, but every time I got stuck I'd read your
answers
again and voila, there would be the info on how to get unstuck. I really
appreciate the clarity and detail since my knowledge of HTML is based
solely on
clicking something in DW and watching what happens in the code window.

Three more questions:

Can you recommend a book on HTML that could take me from the basics to
stuff
like what you just explained?

How do I access news://forums.macromedia.com/macromedia.dreamweaver ?

Is there some insider reason for using "foo" to represent my names for
things
?

Thanks again!




Reply With Quote
  #8  
Old   
Cindy Kruger
 
Posts: n/a

Default Re: editable attributes in templates: 2 ?s - 07-03-2004 , 10:44 AM



Thanks again for all the advice--I'll check out the books you recommended.

Quote:
You access the NNTP forum using a newsreader. I use OutlookExpress on
WXPPro. Set your Read Messages number up to about 1000, and have a ball.
No more sluggish screens....
I've never used a newsreader before so here goes...it's gotta be better than
watching the ball spin on the forum pages.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.