how do i use xml zen to create a link

I want to start using the zen xml coding

how do i use the create link functionality

John

9 comments
Comment actions Permalink

what do you mean 'create a link' in xml?

do you mean html?

for zen html, just type 'a' and hit tab within an html page. it will automatically expand to <a href="*here*"></a> with your cursor in the *here* location.

if you type 'a:link' and hit tab, it will expand to <a href="http://*here*"></a> with the cusro in the *here* location.

make sure that if you're working on django templates that you enable the zen templates for the django context. got to project properties, find the zen templates you want to use with django, then 'edit' them. select django templates to be included.

dimitry, would there be a way to select all of the zen html templates to be used in the django template context? for the most part, these templates are used to write HTML, so to select in bulk the templates to use (or select all) would be very helpful.

thanks,

christian

0
Comment actions Permalink

typing a:link and pressing tab give the following

<a:link></a:link>

was hoping it would use the zen xml function (ctrl+alt+t) which seems to imply that i can pass in the http://www.link.com as a var

am i doing somthing wrong

John

0
Comment actions Permalink

What type of fiel are you ediiting?

If it's a django template, you must follow the directions I outlined above.

If it's a regular HTML file, then check the live template settings

Preferences->Live Templates->Zen HTML and make sure that the 'a' or/and 'a:link' templates are selected.

You may also want to click edit on one of them to make sure they're enabled for the context you're typing in (HTML page, django template, python code, etc).

0
Comment actions Permalink

The file is under a django template folder, I have added it as a such under project settings. its a html file and all live templates are selected

0
Comment actions Permalink

Preferences->Live Templates, expand Zen HTML, select a:link, hit Alt+E (or click the Edit button to the far right).

In that small dialog that comes up, at the bottom toward the middle, is the "Django Templates" box checked?

0
Comment actions Permalink

Thanks, :-)

I can't change the post to a question to give you points


John

0
Comment actions Permalink

Is there away to pass in the link also?

0
Comment actions Permalink

Is there a way to select all of them for django templates in one go, or edit a xml file?

0
Comment actions Permalink

Not sure how to select all of them. I asked Dimitry in my original post.

Dimitry, maybe you have an answer for our question?

As for passing the link to the zen html, i'm not certain. I've never used it. You can look up the Zen HTML guide here: http://code.google.com/p/zen-coding/

If you do find something like that, i'd be interested in knowing.

Thanks!

Christian

0

Please sign in to leave a comment.