I am trying to hide or change the heading 'Dublin Core' that appears on /items/show.php. It appears to wrapped up in the following: <?php echo custom_show_item_metadata(); ?>
It displays on a web page as <h2>Dublin Core</h2>.
Has anyone successfully achieved hiding/deleting this or other parts of the item metadata?
Thanks for your help,
Merrin (University of Otago Library, Dunedin, New Zealand)
Certainly you have a custom.php in your theme's folder. In this file, you'll find in function custom_show_item_metadata() the h2 tag and you can change it.
> I am trying to hide or change the heading 'Dublin Core' that appears > on /items/show.php. It appears to wrapped up in the following: <?php > echo custom_show_item_metadata(); ?>
> It displays on a web page as <h2>Dublin Core</h2>.
> Has anyone successfully achieved hiding/deleting this or other parts > of the item metadata?
> Thanks for your help,
> Merrin (University of Otago Library, Dunedin, New Zealand)
> -- > You received this message because you are subscribed to the Google Groups > "Omeka Dev" group. > To post to this group, send email to omeka-dev@googlegroups.com. > To unsubscribe from this group, send email to > omeka-dev+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/omeka-dev?hl=en.
The answer is not quite so obvious, but pretty easy to implement.
There is a template file, 'item-metadata.php', in application/view/scripts/items, that governs the display of item metadata. custom_show_item_metadata(), which uses show_item_metadata(), uses this template file for formatting.
If you want to remove the 'Dublin Core' heading, you could just copy the 'item-metadata.php' file to your own theme (in theme-name/items/), and remove the line '<h2><?php echo html_escape(__($setName)); ?></h2>'. this will remove the Dublin Core heading, adn all subsequent headings for element sets. (I wouldn't recomment directly editing application/views/scripts/item-metadata.php, since you would potentially lose those changes with any upgrades.)
If you only want to remove it for Dublin Core, you could just do a check on $setName, something like this:
> I am trying to hide or change the heading 'Dublin Core' that appears > on /items/show.php. It appears to wrapped up in the following: <?php > echo custom_show_item_metadata(); ?>
> It displays on a web page as <h2>Dublin Core</h2>.
> Has anyone successfully achieved hiding/deleting this or other parts > of the item metadata?
> Thanks for your help,
> Merrin (University of Otago Library, Dunedin, New Zealand)
> -- > You received this message because you are subscribed to the Google Groups "Omeka Dev" group. > To post to this group, send email to omeka-dev@googlegroups.com. > To unsubscribe from this group, send email to omeka-dev+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/omeka-dev?hl=en.
> The answer is not quite so obvious, but pretty easy to implement.
> There is a template file, 'item-metadata.php', in > application/view/scripts/items, that governs the display of item metadata. > custom_show_item_metadata(), which uses show_item_metadata(), uses this > template file for formatting.
> If you want to remove the 'Dublin Core' heading, you could just copy the > 'item-metadata.php' file to your own theme (in theme-name/items/), and > remove the line '<h2><?php echo html_escape(__($setName)); ?></h2>'. this > will remove the Dublin Core heading, adn all subsequent headings for > element sets. (I wouldn't recomment directly editing > application/views/scripts/item-metadata.php, since you would potentially > lose those changes with any upgrades.)
> If you only want to remove it for Dublin Core, you could just do a check > on $setName, something like this:
> While you're at it, you can of course modify any of the other HTML for > element sets, element names, and values as you'd like in this template file.
> Best, > Jeremy
> On Nov 21, 2011, at 4:59 PM, Merrin B. wrote:
> > Apologies if the answer is obvious....
> > I am trying to hide or change the heading 'Dublin Core' that appears > > on /items/show.php. It appears to wrapped up in the following: <?php > > echo custom_show_item_metadata(); ?>
> > It displays on a web page as <h2>Dublin Core</h2>.
> > Has anyone successfully achieved hiding/deleting this or other parts > > of the item metadata?
> > Thanks for your help,
> > Merrin (University of Otago Library, Dunedin, New Zealand)
> > -- > > You received this message because you are subscribed to the Google > Groups "Omeka Dev" group. > > To post to this group, send email to omeka-dev@googlegroups.com. > > To unsubscribe from this group, send email to > omeka-dev+unsubscribe@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/omeka-dev?hl=en.
> -- > You received this message because you are subscribed to the Google Groups > "Omeka Dev" group. > To post to this group, send email to omeka-dev@googlegroups.com. > To unsubscribe from this group, send email to > omeka-dev+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/omeka-dev?hl=en.
I'm also trying to get rid of those h2 headings, which are going to be confusing for most people, and they show up even when irrelevant and without data for people not logged in (such as with Comments, for example). I've gotten rid of that line in a copy of item-metadata.php in my theme folder (dark), tried putting that modified file in a subdirectory called "items" in that theme folder (because there wasn't one), and in desperation even tried taking the line out of the template version. However, none of these things worked, and the h2 headings seem to be stuck there. Help!
On Monday, 21 November 2011 20:42:32 UTC-5, Jeremy Boggs wrote:
> The answer is not quite so obvious, but pretty easy to implement.
> There is a template file, 'item-metadata.php', in > application/view/scripts/items, that governs the display of item metadata. > custom_show_item_metadata(), which uses show_item_metadata(), uses this > template file for formatting.
> If you want to remove the 'Dublin Core' heading, you could just copy the > 'item-metadata.php' file to your own theme (in theme-name/items/), and > remove the line '<h2><?php echo html_escape(__($setName)); ?></h2>'. this > will remove the Dublin Core heading, adn all subsequent headings for > element sets. (I wouldn't recomment directly editing > application/views/scripts/item-metadata.php, since you would potentially > lose those changes with any upgrades.)
> If you only want to remove it for Dublin Core, you could just do a check > on $setName, something like this:
> While you're at it, you can of course modify any of the other HTML for > element sets, element names, and values as you'd like in this template file.
> Best, > Jeremy
> On Nov 21, 2011, at 4:59 PM, Merrin B. wrote:
> > Apologies if the answer is obvious....
> > I am trying to hide or change the heading 'Dublin Core' that appears > > on /items/show.php. It appears to wrapped up in the following: <?php > > echo custom_show_item_metadata(); ?>
> > It displays on a web page as <h2>Dublin Core</h2>.
> > Has anyone successfully achieved hiding/deleting this or other parts > > of the item metadata?
> > Thanks for your help,
> > Merrin (University of Otago Library, Dunedin, New Zealand)
> > -- > > You received this message because you are subscribed to the Google > Groups "Omeka Dev" group. > > To post to this group, send email to omeka-dev@googlegroups.com. > > To unsubscribe from this group, send email to > omeka-dev+unsubscribe@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/omeka-dev?hl=en.
Followup: The h2 headings actually are going away, but only starting with the Dublin Core one, which I've moved nearer the bottom (instead of leaving it at the top). I wanted the discussion element nearer to the top, so the Comments h2 heading stays there. I'd still like to hide the "Comments" heading (because it's going to be confusing for people not logged in and not having that permission), and I'd also like to change at least the name of the "Comment" field to "Discussion." Where would I do that? Thanks.
On Sunday, 15 July 2012 11:59:24 UTC-4, Durrell Bowman wrote:
> I'm also trying to get rid of those h2 headings, which are going to be > confusing for most people, and they show up even when irrelevant and > without data for people not logged in (such as with Comments, for > example). I've gotten rid of that line in a copy of item-metadata.php in > my theme folder (dark), tried putting that modified file in a subdirectory > called "items" in that theme folder (because there wasn't one), and in > desperation even tried taking the line out of the template version. > However, none of these things worked, and the h2 headings seem to be stuck > there. Help!
> On Monday, 21 November 2011 20:42:32 UTC-5, Jeremy Boggs wrote:
>> The answer is not quite so obvious, but pretty easy to implement.
>> There is a template file, 'item-metadata.php', in >> application/view/scripts/items, that governs the display of item metadata. >> custom_show_item_metadata(), which uses show_item_metadata(), uses this >> template file for formatting.
>> If you want to remove the 'Dublin Core' heading, you could just copy the >> 'item-metadata.php' file to your own theme (in theme-name/items/), and >> remove the line '<h2><?php echo html_escape(__($setName)); ?></h2>'. this >> will remove the Dublin Core heading, adn all subsequent headings for >> element sets. (I wouldn't recomment directly editing >> application/views/scripts/item-metadata.php, since you would potentially >> lose those changes with any upgrades.)
>> If you only want to remove it for Dublin Core, you could just do a check >> on $setName, something like this:
>> While you're at it, you can of course modify any of the other HTML for >> element sets, element names, and values as you'd like in this template file.
>> Best, >> Jeremy
>> On Nov 21, 2011, at 4:59 PM, Merrin B. wrote:
>> > Apologies if the answer is obvious....
>> > I am trying to hide or change the heading 'Dublin Core' that appears >> > on /items/show.php. It appears to wrapped up in the following: <?php >> > echo custom_show_item_metadata(); ?>
>> > It displays on a web page as <h2>Dublin Core</h2>.
>> > Has anyone successfully achieved hiding/deleting this or other parts >> > of the item metadata?
>> > Thanks for your help,
>> > Merrin (University of Otago Library, Dunedin, New Zealand)
>> > -- >> > You received this message because you are subscribed to the Google >> Groups "Omeka Dev" group. >> > To post to this group, send email to omeka-dev@googlegroups.com. >> > To unsubscribe from this group, send email to >> omeka-dev+unsubscribe@googlegroups.com. >> > For more options, visit this group at >> http://groups.google.com/group/omeka-dev?hl=en.
The Comments heading sounds like it's getting added separately, by a plugin, using the 'append_to_items_show' plugin hook, and not through the item metadata itself. If you are using a plugin, which one is it? I can poke around the plugins code to see where it might be added.
Jeremy
On Jul 15, 2012, at 6:26 PM, Durrell Bowman wrote:
> Followup: The h2 headings actually are going away, but only starting with the Dublin Core one, which I've moved nearer the bottom (instead of leaving it at the top). I wanted the discussion element nearer to the top, so the Comments h2 heading stays there. I'd still like to hide the "Comments" heading (because it's going to be confusing for people not logged in and not having that permission), and I'd also like to change at least the name of the "Comment" field to "Discussion." Where would I do that? Thanks.
> On Sunday, 15 July 2012 11:59:24 UTC-4, Durrell Bowman wrote:
> I'm also trying to get rid of those h2 headings, which are going to be confusing for most people, and they show up even when irrelevant and without data for people not logged in (such as with Comments, for example). I've gotten rid of that line in a copy of item-metadata.php in my theme folder (dark), tried putting that modified file in a subdirectory called "items" in that theme folder (because there wasn't one), and in desperation even tried taking the line out of the template version. However, none of these things worked, and the h2 headings seem to be stuck there. Help!
> On Monday, 21 November 2011 20:42:32 UTC-5, Jeremy Boggs wrote:
> The answer is not quite so obvious, but pretty easy to implement.
> There is a template file, 'item-metadata.php', in application/view/scripts/items, that governs the display of item metadata. custom_show_item_metadata(), which uses show_item_metadata(), uses this template file for formatting.
> If you want to remove the 'Dublin Core' heading, you could just copy the 'item-metadata.php' file to your own theme (in theme-name/items/), and remove the line '<h2><?php echo html_escape(__($setName)); ?></h2>'. this will remove the Dublin Core heading, adn all subsequent headings for element sets. (I wouldn't recomment directly editing application/views/scripts/item-metadata.php, since you would potentially lose those changes with any upgrades.)
> If you only want to remove it for Dublin Core, you could just do a check on $setName, something like this:
> While you're at it, you can of course modify any of the other HTML for element sets, element names, and values as you'd like in this template file.
> Best,
> Jeremy
> On Nov 21, 2011, at 4:59 PM, Merrin B. wrote:
> > Apologies if the answer is obvious....
> > I am trying to hide or change the heading 'Dublin Core' that appears
> > on /items/show.php. It appears to wrapped up in the following: <?php
> > echo custom_show_item_metadata(); ?>
> > It displays on a web page as <h2>Dublin Core</h2>.
> > Has anyone successfully achieved hiding/deleting this or other parts
> > of the item metadata?
> > Thanks for your help,
> > Merrin (University of Otago Library, Dunedin, New Zealand)
> > -- > > You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
> > To post to this group, send email to omeka-dev@googlegroups.com.
> > To unsubscribe from this group, send email to omeka-dev+unsubscribe@googlegroups.com.
> > For more options, visit this group at http://groups.google.com/group/omeka-dev?hl=en.
> -- > You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/omeka-dev/-/J8E4J31KxeEJ.
> To post to this group, send email to omeka-dev@googlegroups.com.
> To unsubscribe from this group, send email to omeka-dev+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/omeka-dev?hl=en.
Thanks, Jeremy. I got it. It's the Commenting plugin, and I changed the h2 header from "Comments" to "Discussion of the Content of This Item" in plugins/Commenting/helper/commenting.php and the element label from "Comment" to "Your Contribution" in plugins/Commenting/CommentForm.php.
On Sunday, 15 July 2012 17:21:01 UTC-4, Jeremy Boggs wrote:
> The Comments heading sounds like it's getting added separately, by a > plugin, using the 'append_to_items_show' plugin hook, and not through the > item metadata itself. If you are using a plugin, which one is it? I can > poke around the plugins code to see where it might be added.
> Jeremy
> On Jul 15, 2012, at 6:26 PM, Durrell Bowman wrote:
> Followup: The h2 headings actually are going away, but only starting with > the Dublin Core one, which I've moved nearer the bottom (instead of leaving > it at the top). I wanted the discussion element nearer to the top, so the > Comments h2 heading stays there. I'd still like to hide the "Comments" > heading (because it's going to be confusing for people not logged in and > not having that permission), and I'd also like to change at least the name > of the "Comment" field to "Discussion." Where would I do that? Thanks.
> On Sunday, 15 July 2012 11:59:24 UTC-4, Durrell Bowman wrote:
>> I'm also trying to get rid of those h2 headings, which are going to be >> confusing for most people, and they show up even when irrelevant and >> without data for people not logged in (such as with Comments, for >> example). I've gotten rid of that line in a copy of item-metadata.php in >> my theme folder (dark), tried putting that modified file in a subdirectory >> called "items" in that theme folder (because there wasn't one), and in >> desperation even tried taking the line out of the template version. >> However, none of these things worked, and the h2 headings seem to be stuck >> there. Help!
>> On Monday, 21 November 2011 20:42:32 UTC-5, Jeremy Boggs wrote:
>>> The answer is not quite so obvious, but pretty easy to implement.
>>> There is a template file, 'item-metadata.php', in >>> application/view/scripts/items, that governs the display of item metadata. >>> custom_show_item_metadata(), which uses show_item_metadata(), uses this >>> template file for formatting.
>>> If you want to remove the 'Dublin Core' heading, you could just copy the >>> 'item-metadata.php' file to your own theme (in theme-name/items/), and >>> remove the line '<h2><?php echo html_escape(__($setName)); ?></h2>'. this >>> will remove the Dublin Core heading, adn all subsequent headings for >>> element sets. (I wouldn't recomment directly editing >>> application/views/scripts/item-metadata.php, since you would potentially >>> lose those changes with any upgrades.)
>>> If you only want to remove it for Dublin Core, you could just do a check >>> on $setName, something like this:
>>> While you're at it, you can of course modify any of the other HTML for >>> element sets, element names, and values as you'd like in this template file.
>>> Best, >>> Jeremy
>>> On Nov 21, 2011, at 4:59 PM, Merrin B. wrote:
>>> > Apologies if the answer is obvious....
>>> > I am trying to hide or change the heading 'Dublin Core' that appears >>> > on /items/show.php. It appears to wrapped up in the following: <?php >>> > echo custom_show_item_metadata(); ?>
>>> > It displays on a web page as <h2>Dublin Core</h2>.
>>> > Has anyone successfully achieved hiding/deleting this or other parts >>> > of the item metadata?
>>> > Thanks for your help,
>>> > Merrin (University of Otago Library, Dunedin, New Zealand)
>>> > -- >>> > You received this message because you are subscribed to the Google >>> Groups "Omeka Dev" group. >>> > To post to this group, send email to omeka-dev@googlegroups.com. >>> > To unsubscribe from this group, send email to >>> omeka-dev+unsubscribe@googlegroups.com. >>> > For more options, visit this group at >>> http://groups.google.com/group/omeka-dev?hl=en.
> -- > You received this message because you are subscribed to the Google Groups > "Omeka Dev" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/omeka-dev/-/J8E4J31KxeEJ. > To post to this group, send email to omeka-dev@googlegroups.com. > To unsubscribe from this group, send email to > omeka-dev+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/omeka-dev?hl=en.
} On Monday, November 21, 2011 1:59:27 PM UTC-8, Merrin B. wrote:
> Apologies if the answer is obvious....
> I am trying to hide or change the heading 'Dublin Core' that appears > on /items/show.php. It appears to wrapped up in the following: <?php > echo custom_show_item_metadata(); ?>
> It displays on a web page as <h2>Dublin Core</h2>.
> Has anyone successfully achieved hiding/deleting this or other parts > of the item metadata?
> Thanks for your help,
> Merrin (University of Otago Library, Dunedin, New Zealand)
Jeremy
sorry for my question but I need the line dublin core in my display of elements.....but I don't understand any..
El lunes, 21 de noviembre de 2011 22:42:32 UTC-3, Jeremy Boggs escribió:
> The answer is not quite so obvious, but pretty easy to implement.
> There is a template file, 'item-metadata.php', in > application/view/scripts/items, that governs the display of item metadata. > custom_show_item_metadata(), which uses show_item_metadata(), uses this > template file for formatting.
What is the file that has the template file, 'item-metadata.php', in application/view/scripts/
items?
> If you want to remove the 'Dublin Core' heading, you could just copy the > 'item-metadata.php' file to your own theme (in theme-name/items/),
I use theme seasons and in my directory I have two files
> and remove the line '<h2><?php echo html_escape(__($setName)); ?></h2>'. > this will remove the Dublin Core heading, adn all subsequent headings for > element sets. (I wouldn't recomment directly editing > application/views/scripts/item-metadata.php, since you would potentially > lose those changes with any upgrades.)
> If you only want to remove it for Dublin Core, you could just do a check > on $setName, something like this:
> While you're at it, you can of course modify any of the other HTML for > element sets, element names, and values as you'd like in this template file.
> Best,
> Jeremy
> On Nov 21, 2011, at 4:59 PM, Merrin B. wrote:
> > Apologies if the answer is obvious....
> > I am trying to hide or change the heading 'Dublin Core' that appears
> > on /items/show.php. It appears to wrapped up in the following: <?php
> > echo custom_show_item_metadata(); ?>
> > It displays on a web page as <h2>Dublin Core</h2>.
> > Has anyone successfully achieved hiding/deleting this or other parts
> > of the item metadata?
> > Thanks for your help,
> > Merrin (University of Otago Library, Dunedin, New Zealand)
> > -- > > You received this message because you are subscribed to the Google > Groups "Omeka Dev" group.
> > To post to this group, send email to omek...@googlegroups.com<javascript:>
> .
> > To unsubscribe from this group, send email to > omeka-dev+...@googlegroups.com <javascript:>.
> > For more options, visit this group at > http://groups.google.com/group/omeka-dev?hl=en.
On Feb 28, 2013, at 7:47 AM, Gus Urban <gusunava...@gmail.com> wrote:
> What is the file that has the template file, 'item-metadata.php', in application/view/scripts/
> items?
the item-metadata.php file was replaced by common/record-metadata.php. That template isn't included by another file, but rather is used by the view helpers for displaying record metadata.
> If you want to remove the 'Dublin Core' heading, you could just copy the 'item-metadata.php' file to your own theme (in theme-name/items/),
> I use theme seasons and in my directory I have two files
> random-featured.php show.php
> sorry for my questions
So yeah, if you want to change the output that's governed by that template, first you'd need to copy the core file to your own theme.
To: your_omeka_dir/themes/seasons/common/record-metadata.php
If your Seasons theme doesn't have a directory called 'common' you'll need to create that directory first.
And then edit the file in your theme as you wish. The Omeka codex has a good page explaining the relationship between Omeka's core view files and custom themes:
> On Feb 28, 2013, at 7:47 AM, Gus Urban <gusun...@gmail.com <javascript:>> > wrote:
> What is the file that has the template file, 'item-metadata.php', in > application/view/scripts/
> items?
> the item-metadata.php file was replaced by common/record-metadata.php. > That template isn't included by another file, but rather is used by the > view helpers for displaying record metadata.
> If you want to remove the 'Dublin Core' heading, you could just copy the >> 'item-metadata.php' file to your own theme (in theme-name/items/),
> I use theme seasons and in my directory I have two files
> random-featured.php show.php
> sorry for my questions
> So yeah, if you want to change the output that's governed by that > template, first you'd need to copy the core file to your own theme.
> To: your_omeka_dir/themes/seasons/common/record-metadata.php
> If your Seasons theme doesn't have a directory called 'common' you'll need > to create that directory first.
> And then edit the file in your theme as you wish. The Omeka codex has a > good page explaining the relationship between Omeka's core view files and > custom themes: