Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Fields (and I18N)
This post is 4 months old

yeah that function is terribly named, but it will get you fields other than content.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
You can use getPageField (or returnPageField) instead...
Reply
oh yeah, i forgot about that wrapper
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
Not just wrappers, they will not load the xml file if the field is in the page cache.
Reply
indeed
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
Hello Martin,

thank you for your great plug-in!

I have an idea, suggestion, wish. It would be great if we can group a list of custom fields to repeat as often as we need it.

Something like this structure ('custom_fieldGroup' is just my idea to group items):

PHP Code:
<?php custom_fieldGroup('myListName, start'); ?>
<li>
  <h2><?php get_custom_field('headline'); ?></h2>
  <img class="<?php get_custom_field('class'); ?>" src="<?php get_custom_field('image'); ?>" alt="Image">
  <p><?php get_custom_field('text'); ?></p>
</li>
<?php custom_fieldGroup('myListName, end'); ?>

Via this dialogue:

[Image: CustomFieldsGroup.gif]

Clicking the plus button will create a new <li> with the same custom fields. The best is... it makes the CK Editor obsolete Big Grin No more destroyed layouts Shy

What do you think?

Cheers and have a good day!
Reply
Feature suggestion: Provide a hook for other plugins to extend/ save custom fields too.
In concreto, in the file i18n_custom_fields.php, in the function i18n_custom_fields_save() , between approx. line 108 and 109, add the code exec_action('customfields-save') so other plugins have access to the $defs and $xml variables and can eventually add their own fields/ extend existing ones
Reply
Lightbulb 
Hi,

Would there be a way to make the custom fields appear on the news pages created using NEWSMANANER (updated) plugin?

Many thanks in advance!
Anthony
Reply
Hi.


It's strange... I would like use a gallery in a a custom field.

I create a custom field with WYSIWIG editor and write (% gallery name=gallery-one %) but the gallery appears only if
write (% gallery name=gallery-one %) in the normal WYSIWIG editor of Getsimple.
If not (% gallery name=gallery-one %) apperars on the page

Any Idea
Thank's
Philippe
Reply
(2016-02-13, 06:35:36)philippe Wrote: I create a custom field with WYSIWIG editor and write (% gallery name=gallery-one %) but the gallery appears only if
write (% gallery name=gallery-one %) in the normal WYSIWIG editor of Getsimple.
If not (% gallery name=gallery-one %) apperars on the page

Yes, this is a known limitation.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Thank's Martin
Reply
I question whether it is possible to hide or disable individual custom fields in the admin panel ? I added a eight fields . I would like to have three first visible on the home page , the next four on the next page and the last one to the next . Is it possible to somehow do it ? Maybe someone has an idea how to do it using CSS something else ?
Reply
(2013-08-30, 18:06:44)b3n.ji Wrote: Hey there,

maybe this was already asked before but: is there any way to get a custom field based on the page slug?
I need to duplicate a page, defining to get the content from page1 into page2, but the same does not work for the custom field I'm addionally calling.
Any suggestions? Or just mabye any way to get a second variable added to get_custom_field() ?

Thanks in advance!

You can use next code to achieve this:


PHP Code:
<?php getPageContent('page_slug''custom_field_name');
?>

Or use this as variable:


PHP Code:
<?php $variable returnPageContent('page_slug''custom_field_name');
?>

If this index page, then 'page_slug' equal index

If you want to check if the your custom field have any content:


PHP Code:
<?php

$variable 
returnPageContent('page_slug''custom_field_name');

if(
$variable) :
<
h1>Header</h1
echo 
$variable
endif ; 
?>
Reply
Hi together,

I am looking for a way to sort the Custom-Fields in the editor.

I have created three Custom-Fields and in the editor these fields are shown first.

At last the main-content-field is shown.

I am looking for a way to have the content-field first.

Peter
Reply
How open link in new tab?
Reply
(2016-05-01, 04:05:33)vixrealitum Wrote: I question whether it is possible to hide or disable individual custom fields in the admin panel ? I added a eight fields . I would like to have three first visible on the home page , the next four on the next page and the last one to the next . Is it possible to somehow do it ? Maybe someone has an idea how to do it using CSS something else ?

I also would like to know if this is possible because I have many customfields. It would be easier to see what content is actually on the site. Thank you :-)
Reply
(2016-07-27, 02:37:05)smsHH Wrote:
(2016-05-01, 04:05:33)vixrealitum Wrote: I question whether it is possible to hide or disable individual custom fields in the admin panel ? I added a eight fields . I would like to have three first visible on the home page , the next four on the next page and the last one to the next . Is it possible to somehow do it ? Maybe someone has an idea how to do it using CSS something else ?

I also would like to know if this is possible because I have many customfields. It would be easier to see what content is actually on the site. Thank you :-)

If you want to have different custom fields depending on the page (type) you should look at I18N Special Pages.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
(2016-07-27, 03:31:31)mvlcek Wrote: If you want to have different custom fields depending on the page (type) you should look at I18N Special Pages.

Thank you, I will have a look at it Smile
Reply
GetSimple newbie..
So I have to put the php code <?php get_custom_field('thing'); ?> in a template or a component?
I can't input the code in the source of a page?
How to put it into the sidebar for instance?

Let's say I wanna have a table in several pages, where every row shall end with a button.
By pressing this button, some content of this row (together with the slug or a custom field of the actual page) is processed by php to output some text in the sidebar.
Would this plugin be usefull there?

You are free to give a newbie useful tips for above scenario ;-)
I am not new to php, though.
Reply
I suppose you can do it with I18N Search, see custom rendering
Reply
Hello there, i love this plugin it's really helpful.
I wonder if it is possible to have custom fields by page model, otherwise the options page becomes very long, even for pages that do not use some fields.
For example i have Main Page main.php (template) with custom fields like "Slide1 img, slide1 title, slide1 description, slide 2, etc etc"
But other pages with standard template, don't need slides but other stuff.
Is that possibile?

Best
Reply
Yes, with Special Pages.
Reply
(2019-07-16, 21:45:15)smsHH Wrote: Yes, with Special Pages.

Cool!
Download it and install it but i cant understand how to do that  Sad
Reply
Quote:Download it and install it but i cant understand how to do that

Hi Lakaroth,

Everything you need to know about the Special Pages plugin you can find here:

http://mvlcek.bplaced.net/get-simple/i18nspecialpages/
Reply
(2016-07-27, 03:31:31)mvlcek Wrote:
(2016-07-27, 02:37:05)smsHH Wrote:
(2016-05-01, 04:05:33)vixrealitum Wrote: I question whether it is possible to hide or disable individual custom fields in the admin panel ? I added a eight fields . I would like to have three first visible on the home page , the next four on the next page and the last one to the next . Is it possible to somehow do it ? Maybe someone has an idea how to do it using CSS something else ?

I also would like to know if this is possible because I have many customfields. It would be easier to see what content is actually on the site. Thank you :-)

If you want to have different custom fields depending on the page (type) you should look at I18N Special Pages.

mvlcek if I have a home page and want to add custom fields to it, I can only do it through the Custom Fields plugin. Index page cannot be removed and recreated from the special pages plugin. Other pages can be created by special pages only the problem is that they inherit all special fields from the main page. I wanted to keep it to a minimum. I would like to display only those fields that are currently used.
Reply




Users browsing this thread: 1 Guest(s)