Keyword

Call extra field type

  • xtreme07
  • xtreme07's Avatar Topic Author
  • Offline
  • New Member
More
13 years 6 months ago #95403 by xtreme07
Call extra field type was created by xtreme07
Hi,

 

i need to call the link field type separately from the other fields in the item.php

i need to call it separately so i can add multiple link types and add the same css to all of them. this also allows me to add css to the other extra field types

 

Example of what i need

in the backend i'd have:

linkField1: link1

linkField2: link2

linkField3: link3

 

in the item.php i'd have:

echo $extraField->linkField;

or

echo $linkField;

 

// where $linkField represents all link fields. it represents linkField1, linkField2, linkField3

 

Something like that so i can wrap the same css on all of the link fields using only one line of code that is different from the other field types.

 

Also, the link type would alow me to loop the link field from the backend and NOT from php where i would have to call them manualy.

 

I'd appreciate some help on this ..

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
13 years 6 months ago #95404 by Yiota
Replied by Yiota on topic Call extra field type
You can add an extra class to the loop of the extra fields where you could either count the number of the extra field you need to call separately or you could target it by its name.

Please Log in or Create an account to join the conversation.

  • xtreme07
  • xtreme07's Avatar Topic Author
  • Offline
  • New Member
More
13 years 6 months ago #95405 by xtreme07
Replied by xtreme07 on topic Call extra field type
from what your saying, i understand that it's not possible to loop the link field type without calling manually each field name from the php. which means i can't achieve what i need.

 

if you read above, in the 1st post, i said i need to call the link fields type using one line like echo $linkFieldType;

 

and not

$linkFieldName[0];

$linkFieldName[1];

 

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
13 years 6 months ago #95406 by Yiota
Replied by Yiota on topic Call extra field type
If you made an if statement per $extraField->type ? If the type is Link, then show the extra field with this style else ...

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum