Jump to content

Template variables


opentype

Recommended Posts

Looking at the new template editor I am really missing the old template tag overview column where I could easily pick out any variables of my databases. 

Bildschirmfoto_2014-12-18_um_16.54.56.th

Is that really gone? Is there some other place or way to see these variables?

In addition, the template logic has changed significantly. 

How would I recreate something like this now?

<if test="$data['record']['field_20_value']=='something'">
 Text: {$data['record']['field_20_value']}
</if>

 

Link to comment
Share on other sites

I am really hoping some of the features like the variables available come back. We had all custom blocks using a primarily cached index page for the live site. Now on the test upgrade I am going to have to basically start completely over which is fine but there is a lot of stuff missing. Seems like a lot of settings we used to have are not there anymore site wide also. I like where 4.0 is going but wish we still had some of those setting options. 

Link to comment
Share on other sites

@opentype: Look at the documentation you're linking too for how to write new if-section ;) 

Should be something like: {{if $data['key'] == 'something'}} Text {$data['key']} {{endif}}

You could look at how things are done in the default theme by going into edit mode for it.

I'm on mobile now, so can't provide any more detailed instructions right now, but do say if you need more guidance on that

Link to comment
Share on other sites

Should be something like: {{if $data['key'] == 'something'}} Text {$data['key']} {{endif}}

​Yeah, I got how to set up the statements in general. But I a struggling to find out how specific variables are called /accessed now. In the default templates, I see they are now written like $record->some_name_here. 

But there is no overview of these names anymore and I don’t know where to find them elsewhere. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...