Topic: Display additional fields in news

Hey everyone,

first of all, I'm from Germany and I might fail to describe the issue and express myself correctly due to the foreign language. However, I deeply hope that you'll get anything straight away.

Also, I explored CuteNews for the first time and sucessfully made it work until I stuck at the additional fields, more precisely on it's display. I figured out how to create fields, but failed when I tried to show those fields on the frontend.

Is there anything further I need to include or any variables I need to set when I include the "show_news.php"?

For instance, I created two checkboxes and a price field, so how do I display them in the news?

Thanks for any help and instructions and see you soon
Ne0

Re: Display additional fields in news

Hello Ne0,

to display the additional field you must set it in your template:

{additionalField_name}

or

[if {additionalField_name}] * {additionalField_name}
[/if]


greetings

Re: Display additional fields in news

Hello Ne0,

to display the additional field you must set it in your template:

{additionalField_name}

or

[if {additionalField_name}] * {additionalField_name}
[/if]


greetings


Hello Perry and thanks for your quick reply. However, I couldn't make it work. Do I need to replace the "name" with the name I set in the backend for the additional fields? I tried both versions as well as the "replacement version", none worked. I added your line in /skins/base/defaults/templates.tpl in the "*active"-section. What did I miss?

Good night
Ne0

Re: Display additional fields in news

Hello Perry and thanks for your quick reply. However, I couldn't make it work. Do I need to replace the "name" with the name I set in the backend for the additional fields? I tried both versions as well as the "replacement version", none worked. I added your line in /skins/base/defaults/templates.tpl in the "*active"-section. What did I miss?

Good night
Ne0


No @ admin panel -> templates

https://cutephp.com/forum/uploads/monthly_02_2015/post-80230-1424766077.png

5 (edited by 2015-02-26 02:47:04)

Re: Display additional fields in news

No @ admin panel -> templates

https://cutephp.com/forum/uploads/monthly_02_2015/post-80230-1424766077.png


Should do the same, actually. Found my code in the template, however, it didn't work either way. Any more ideas?

Thanks for your help though :-)!

EDIT: By the way, do I need to add that codesnippet (with its unique name) for every additional field I created?

Re: Display additional fields in news

I would also like to know how to accomplish this as i have tried multiple ways of putting the additional feild in the template and hard coding it in the template..


{additionalField_images}

And as

{images}

I am unclear as to how this is suppose to work and how it is to display i have put it right in the template after short story and in the full story as well.

Still no dice:(

Would like a example if possible of how to get this working thanks.

Re: Display additional fields in news

Dashboard
Additional fields-> Form:

Field Type: Image/Resource
Name: Thumbnail01

->Add/Replace field


Dashboard
Write into your template:
Into 'Active News'

<h1>{title}</h1>
[img]{Thumbnail01}[/img]

->'Save template'


Dashboard
-> Add news

Thumbnail01 Form: Select your image

Post the news.


Greetings John



Re: Display additional fields in news

That worked thanks. I dunno what i did different to make it not work before must have missed one step or something.

THanks

9 (edited by 2015-03-04 21:21:10)

Re: Display additional fields in news

Hi,

Dashboard
Additional fields-> Form:

Field Type: Image/Resource
Name: Thumbnail01

->Add/Replace field


Dashboard
Write into your template:
Into 'Active News'

<h1>{title}</h1>
[img]{Thumbnail01}[/img]

->'Save template'


Dashboard
-> Add news

Thumbnail01 Form: Select your image

Post the news.


Greetings John

Thanks John, that worked for me as well. A little hint that may save some minutes of try'n'error: As shown above use {name}, for instance {price}, for every single additional field. Also, if you use those [if]-queries, remember to end the line for every query, otherwise it will result in errors.

Thanks again and see you soon
Ne0

PS: John, I hope you received my pm, it didn't show up in the sent folder...

10 (edited by Warren142 2019-02-19 06:49:56)

Re: Display additional fields in news

The Edit Post screen in WordPress.
Check the box “Custom Fields”
The Custom Fields area MyPrepaidCenter.
An example of saving the information about a product in custom fields.
Add extra data into a custom field.

Re: Display additional fields in news

If you are using WordPress as Website editor then check  the box “Custom Fields” and Custom Field Area Myprepaidcenter and example of saving information about the product
in the custom filed and now add the Extra Data Into the Custom Field.