Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Thanks for thisFolder and thisArticle

Thanks for thisFolder and thisArticle. 

As long as I can do something like {$. thisArticle.extra1 $} in a template this will allow me to create one template to replace about 500 places where this is hardcoded in my site.

David Burch
Thursday, May 22, 2003

Couldn't you have just put {$ .extra1 $} in your template before?

I'm sure I'm misunderstanding, but if you just wanted to put the extra1 field for each article the template was applied to IN the template, you just write {$ .extra1 $} (the same as you would if you put the cityscript in the article itself).

Michael H. Pryor
Thursday, May 22, 2003

You're absolutely correct.  I'll have to look back through the site to see what it was I ran into problems with.

David Burch
Thursday, May 22, 2003

You can't do this:

{$foreach x in (keywordcontains "{$.extra1$}) $}

if that's what you were thinking of.

www.marktaw.com
Thursday, May 22, 2003

That's it exactly. 

I need this to make one template that would automate the building of index pages.  For example, I have author bio pages that list all the articles by an author.

Right now, I have to change the foreach loop on EVERY index page:
{$ foreach article in (author "Author Name") $}

What I needed to be able to do is this:
{$ foreach article in (author ".title") $}

I need to do this on all the index pages at SouthernNewMexico.com, where I have indexes by region, county, city, and category.  Each one must be updated manually, a real pain when changing the presentation from tables to divs.

So, the new thisArticle doesn't help me.

David Burch

David Burch
Thursday, May 22, 2003

David... I believe there's the potential for recusion if you do something like this. I completely forget why, but I had figured it out at one point.

Best ask the Fog folks about this one.

www.marktaw.com
Thursday, May 22, 2003

Pity there's nothing like

thisFolder/*

I was looking foward to that.

It was the popular request in
an earlier thread.

Mark Major
Thursday, May 22, 2003

Will thisFolder/* be implemented in a future version?

John Sisk
Wednesday, September 10, 2003

*  Recent Topics

*  Fog Creek Home