We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Changing the ’Edit’ layout in the admin

Development and Programming

webnology's avatar
webnology
352 posts
about 17 years ago
webnology's avatar webnology

Hi all,

in the Edit of my weblogs, I see title, view, author, etc… Is it possible to add a custom filed to that, next tot tiele? For example, the article number of ana rticle, as this is truly unique, while description mught be the same.

Thx, M

Thread Moved by Moderator to Extensions: Discussion and Questions

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
about 17 years ago
Sue Crocker's avatar Sue Crocker

webnology, you could do this via an extension. Would you like me to move this to the Extensions forum for you?

       
webnology's avatar
webnology
352 posts
about 17 years ago
webnology's avatar webnology

yes, thx. I’ll take a look at that.

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
about 17 years ago
Sue Crocker's avatar Sue Crocker

Hey, Leevi, Mark, any one else doing extensions, any ideas for this?

       
Max Lazar's avatar
Max Lazar
337 posts
about 17 years ago
Max Lazar's avatar Max Lazar

May be I miss something but the article number is in the first column. But if you want added some extra columns you can use hooks edit_entries_additional_tableheader and edit_entries_additional_celldata.

For example - Weegee from Masuga add edition information (thumbnail image) the same way.

       
webnology's avatar
webnology
352 posts
about 17 years ago
webnology's avatar webnology

Hay Maxup,

the first column is actually the entry_id, but I meant truly the inhouse article number, like ART_1bis for example. I’llt ake a look at what you posted, but it feels promiing.

Thx, M

       
webnology's avatar
webnology
352 posts
about 17 years ago
webnology's avatar webnology

I’m kind of lost how to use these hooks. Could someone help me to get this working?

Thx, M

       
Max Lazar's avatar
Max Lazar
337 posts
about 17 years ago
Max Lazar's avatar Max Lazar

Look, I make small example for you. You just need to install it like usual extension, enable it and then enter the field id number in extension settings.

       
webnology's avatar
webnology
352 posts
about 17 years ago
webnology's avatar webnology

Hi MAxup,

I instelled the extension, enable it, but what do I need to fill as id. The id of my custom field ‘Article Number’ is ‘nummer’. If I fill in this, it gives me the error that the column does not exist.

Notice: Undefined variable: field_label in /home/pacoor/public_html/system/extensions/ext.edit_custom_field.php on line 139
MySQL ERROR:

Error Number: 1054

Description: Unknown column 'field_id_nummer' in 'field list'

Query: SELECT field_id_nummer FROM exp_weblog_data WHERE entry_id='57'

Where do i go wrong?

M

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
about 17 years ago
Mark Bowen's avatar Mark Bowen

I think you’ll need the actual id number of the field instead which you will find by going to :

Admin->Weblog Administration->Custom Weblog Fields->(Your Field Group Name)->Add/Edit Custom Fields

Hover over the field that you wish to find the id for and in the status bar you should see a longish link which should have field_id=2 tacked on the end. Where I have placed 2 previously you will find the id number that you need.

You need to hover over the field name in this way because you may one day order the fields in the back end differently and the numbers that show in the back-end are layout numbers as opposed to the actual field id.

Hope that helps. Great little extension by the way MaxUp 😉

Best wishes,

Mark

       
Max Lazar's avatar
Max Lazar
337 posts
about 17 years ago
Max Lazar's avatar Max Lazar

because ‘nummer’ is not ID. It’s the name. When you edit customer field by Weblog Administration › Field Groups › Custom Fields look in URL C=admin&M=blog_admin&P=edit_field&field;_id=ID last numbers it was you need

Surely it was passable to make option for detected ID by custom field name, but it one more query, so I decided don’t do it.

       
Max Lazar's avatar
Max Lazar
337 posts
about 17 years ago
Max Lazar's avatar Max Lazar

Mark Bowen It’s just simple example 😊 But, i think webnology request has some ideas for good futures expansion.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
about 17 years ago
Mark Bowen's avatar Mark Bowen

Still a great extension though. Not only does it provide a very useful function for a lot of people but it also provides a good example of how to go about creating these kinds of extensions too for developers.

Kudos to you 😊

Best wishes,

Mark

       
webnology's avatar
webnology
352 posts
about 17 years ago
webnology's avatar webnology

Oh yes, it works. Thank you all very much.

M

       
Meirion's avatar
Meirion
127 posts
16 years ago
Meirion's avatar Meirion

Brilliant, thanks MaxUp 😊

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.