x
Toggle Content    Register or Login  -  January 18, 2018, 2:28 am  
Toggle Content Commercial Themes
This is an opportunity for you to preview TCD commercial themes. All themes seen here can be purchased from the store.
Toggle Content User Info

Welcome Anonymous

Toggle Content Navigation
Toggle Content Project Status
Support Forums » DragonflyCMS » Theme Support » Help with template engine syntax
Please use the forum search before making a post. Your question might have been previously answered.

Help with template engine syntax
General theme support for all themes not created nor worked on by TCD.
Basically community theme support.

Post new topic   Reply to topic    Forum Index » Theme Support Printer Friendly Page

View previous topic :: View next topic  
Author Message
Member


PostPosted: Mon Jun 18, 2007 10:38 pm Reply with quote

Hi.

I am desperately trying to find a tutorial or some form of documentation on the Dragonfly template engine, with examples. I can't seem to find anything anywhere.

I know that it's based on the smarty template engine, but for smarty, the syntax would be something like this:

Code:
{if $some_var}
    <span style="color: blue;">Output text</span>
{/if}

But the syntax we use would be:

Code:
<!-- IF SOME_VAR -->
    <span style="color: blue;">Output text</span>
<!-- ENDIF -->

It's the latter that I am stuck on. Does any documentation exist? Is there some seriously simple logic behind it that I am missing?

Thanks in advance.


Back to top
View user's profile
Lead Developer


PostPosted: Tue Jun 19, 2007 7:44 am Reply with quote

The actual variables are defined in each theme's theme.php file. They are then called up using the code in your second example. You must define/assign the variable before you can use it. Look into the default theme's theme.php. Everything starts from theme.php then filters down into the .html template files.


_________________

Back to top
View user's profile Photo Gallery
Member


PostPosted: Tue Jun 19, 2007 10:54 am Reply with quote

Devon wrote:
The actual variables are defined in each theme's theme.php file. They are then called up using the code in your second example. You must define/assign the variable before you can use it. Look into the default theme's theme.php. Everything starts from theme.php then filters down into the .html template files.

I get that, I just don't understand the syntax, or more specifically, I can't find any documentation on it. Is it Smarty, or does it have a different name?


Back to top
View user's profile
Lead Developer


PostPosted: Tue Jun 19, 2007 11:13 am Reply with quote

It was based off of smarty about 4 years ago. Since then it's deviated quite a lot to become it's own engine. The similarities are still there but things were incorporated for Dragonfly's needs. So we call it the Dragonfly template engine though there isn't much of an engine to it. The core of the template engine is includes/classes/template.php

I don't understand the syntax of <!-- if_whatever --> either really but I know how to use it. I believe it's something that the DF devs came up with through a combination of phplib and smarty from reading the template credit.

There is no documentation for the actual template engine itself or much of theme.php either. Documentation for Dragonfly is very poor though there have been great strides in the past year by user contributions since the wiki was put up. Most of the inner sanctum code is at the least commented on within the wiki but actual examples like you'd find at php.net are not, making things damn confusing, I know exactly how you feel.

If there is something specific you need help with for theme creation I can help. As to the inner working of the engine itself I haven't really bothered to learn. I get out of it what I need and that's all I aimed for. If you need help with understanding the engine that's best left for a developer to answer. Don't PM them over at df.org either they won't respond. Best hope is to post in the forums and pray they answer.


_________________

Back to top
View user's profile Photo Gallery
Member


PostPosted: Tue Jun 19, 2007 11:22 am Reply with quote

Devon wrote:
It was based off of smarty about 4 years ago. Since then it's deviated quite a lot to become it's own engine. The similarities are still there but things were incorporated for Dragonfly's needs. So we call it the Dragonfly template engine though there isn't much of an engine to it. The core of the template engine is includes/classes/template.php

I don't understand the syntax of <!-- if_whatever --> either really but I know how to use it. I believe it's something that the DF devs came up with through a combination of phplib and smarty from reading the template credit.

There is no documentation for the actual template engine itself or much of theme.php either. Documentation for Dragonfly is very poor though there have been great strides in the past year by user contributions since the wiki was put up. Most of the inner sanctum code is at the least commented on within the wiki but actual examples like you'd find at php.net are not, making things damn confusing, I know exactly how you feel.

If there is something specific you need help with for theme creation I can help. As to the inner working of the engine itself I haven't really bothered to learn. I get out of it what I need and that's all I aimed for. If you need help with understanding the engine that's best left for a developer to answer. Don't PM them over at df.org either they won't respond. Best hope is to post in the forums and pray they answer.

OK, so I guess I just need to hack it a bit. No problem. I just wanted to be certain that I wasn't missing out on some documentation somewhere, lol. Obviously we'd all rather read documentation than try to reverse engineer something in order to figure out how the hell it does what it does.

Many thanks for taking to time to reply in such detail, you answered all of the questions that I would have more than likely asked eventually. I might try and document it myself... If I can find the time...

It seems that just about every project I start seems to branch off into several more projects, and it just goes on. I don't want to print out my TODO list, as it would probably require several small rain forests-worth of paper...


Back to top
View user's profile
Lead Developer


PostPosted: Tue Jun 19, 2007 11:43 am Reply with quote

Yeah we've all got tons of projects going on. One of the best modules for coders in DF is the projects pro module by myndworx.com. I'm running it here. Oh it's made my life so much easier I highly recommend it.

Yeah I just went to the DF site to try and find anything on the template engine. Nada. If you try to document it I would be interested to see the documentation, perhaps add something from a theme designers perspective into it.

I do have video tutorials for download here but nothing covering the engine itself only how to use it. So if you want to hear my sexy voice check one out. ;P


_________________

Back to top
View user's profile Photo Gallery
Member


PostPosted: Tue Jun 19, 2007 12:06 pm Reply with quote

Devon wrote:
Yeah we've all got tons of projects going on. One of the best modules for coders in DF is the projects pro module by myndworx.com. I'm running it here. Oh it's made my life so much easier I highly recommend it.

I downloaded it earlier today but I wasn't sure if it suited my needs, I just haven't installed it yet. it. Thanks for the recommendation. My projects don't necessarily need to be aired to the general public, as they are usually projects I choose to start on my own accord. I will be installing it sooner or later. Even if it's just on my localhost server.

Devon wrote:

Yeah I just went to the DF site to try and find anything on the template engine. Nada. If you try to document it I would be interested to see the documentation, perhaps add something from a theme designers perspective into it.

Don't tempt me... Razz

Devon wrote:

I do have video tutorials for download here but nothing covering the engine itself only how to use it. So if you want to hear my sexy voice check one out. ;P

Already did, and I commented too. But once again, it was a fantastic primer tutorial for getting people started with themes. You showed just enough to help people understand what to do and eventually learn how to create a theme from scratch. It is the best Video tutorial I have seen in quite a while (on ANY subject!), and also quite entertaining. Many thanks again for making it.


Back to top
View user's profile
Newbie


PostPosted: Mon Dec 22, 2014 2:33 am Reply with quote

Just wondering if this theme on your site
has been updated for the new version of df? If not is it possible to do? I run this theme on my site and can't quite figure out all the files to edit?

adil


Back to top
View user's profile
Lead Developer


PostPosted: Mon Dec 29, 2014 7:38 am Reply with quote

It has not and will not be.


_________________

Back to top
View user's profile Photo Gallery
  Page 1 of 1All times are GMT - 5 Hours

Post new topic   Reply to topic    Forum Index » Theme Support Printer Friendly Page

  
  
  
 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


RSS-News
RSS-Downloads
RSS-Forums
RSS-KnowledgeBase
Valid CSS!
Valid HTML 4.01!

Site Search | Support | Contact | Payments | Link to Us
All TCD logos and trademarks in this site are property of TreasureCoastDesigns.com
Interactive software released under GNU GPL, Code Credits, Privacy Policy
TCD_Natural © T.C.D.