8 posts by 5 authors in: Forums > Off Topic / Other
Last Post: October 8, 2002   (RSS)

By Dave - October 6, 2002

Would anyone like to see template logic? eg:

<!--[ if nextpage > 0 ]-->
<a href="...">next</a>
<!--[ else ]-->
<font color="gray">next</font>
<!--[ end if ]-->

If we were to add something like this it would give a lot more control to template developers, and we'd have a lot less templatecells. But, it might make things a little more complicated.

What does everyone thing? Have you seen any template logic/code systems you really liked?

Please note, even if we do decide to go with something like this, it won't likely be in the first release of Article Manager 2.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Template Logic, good or bad?

This sounds extremely interesting Dave.

What other stuff can we do with this? can you give us more examples on what we can control?
--------------
Sure you can spell it, but do you get it?

Re: [MalaK_3araby] Template Logic, good or bad?

Yes, Dave, it'd be fabulous. I can think of a million uses for this.

In fact, only last week I ended up adapting another suggestion made in these forums as a workaround for not having if/else logic available - see the index at www.gamesolutionzone.com where articles have a little graphic telling you which console they relate to.
-
Dave Cusick (dave.cusick@livepublishing.co.uk)
Group Editor & Web Administrator
Live Publishing International Ltd
www.livepublishing.co.uk

Re: [MalaK_3araby] Template Logic, good or bad?

By Dave - October 7, 2002

>What other stuff can we do with this? can you give us more examples on what we can control?

Well you'd have basic programming logic. So you'd have if, else if, else, math operators, etc.

So, all those times in the forum when people ask about displaying an image or some content in one situation, but not another, they'd be able to put some tags around it like this:

<[ if situation1 ]>
Show this html
<[ end if ]>

<[ if situation2 ]>
Show this other html
<[ end if ]>

One example might be if we supported multiple page articles in the future and you wanted to publish some content only on the last page. If their was a placeholder for total_pages and current_page you could say

<[ if current_page == total_pages ]>
display this content here
<[end if]>

Which would mean you on the last page in the set.

Does that make any sense? : )
Dave Edis - Senior Developer
interactivetools.com

Re: [MalaK_3araby] Template Logic, good or bad?

By Dave - October 7, 2002

>How about enabling us to define our own variables from the admin interface?

We want to add something like that to 2.0, where users can defined "global placeholders" that are available everywhere. So you can change the site title, copyright footer, etc, in one place and just hit republish.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Template Logic, good or bad?

By Teambldr - October 7, 2002 - edited: October 7, 2002

Hi Dave,



IF statements are A LOT of fun.

For example, if your have registered and unregistered users you can show items to the registered users that unregistered can't see and vice versa.

If unregistered: Show this
If registered: Show this
If Editor: Show this
etc...

So count me in on IF's![cool]
Brian

Re: [Dave] Template Logic, good or bad?

By Zyllyx - October 8, 2002


>How about enabling us to define our own variables from the admin interface?

We want to add something like that to 2.0, where users can defined "global placeholders" that are available everywhere. So you can change the site title, copyright footer, etc, in one place and just hit republish.

I would love you guys forever if you implemented this... [;)]