Jump to content

Database / Article Templates


ak

Recommended Posts

When editing page content for an Article Database, other than the standard

{database="1"}

in Articles content, is there a way to more finely control what is displayed on a more granular level ?

I couldn't find any documentation on this on the IPS4 Docs.

Link to comment
Share on other sites

What I am trying to do is customise the output of databases lists and records on pages.

I found a partial solution to my problem which was to create custom page templates for each of my databases.

However now I am stuck with 

{$fieldValue|raw}

which gives me a <span using specific classes. 

I'm currently trying to work out what other options for $fieldvalue I can use in order to customise the style just for those fields.

If there is some documentation on the templating language that I have missed I'd appreciate being pointed to it.

 

Link to comment
Share on other sites

12 minutes ago, opentype said:

You can also customize the field output there without even touching the database view templates. 

For more control, setting up category/listing/record templates for the database and then customizing them is the right way to go. 

Thanks. 

What I have done so far is to create custom HTML templates for each database view and am customising those, because I need to change styles specifically to each view. 

I'll keep muddling through it and see how I go, thanks for the tips.

One question, is it possible to use PHP within HTML templates ?

Link to comment
Share on other sites

I am still trying to work all this out.

Is it possible for me to pass the contents of

 

{$record->customFieldDisplayByKey('address', 'listing')}

 

to PHP and perform an action on that returned data ?

 

 

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...