Would it be possible to add a "continue reading" tag like the one in WordPress to use in one of the Dublin Core Fields (description, my introductions are a little long) in Omeka?
Here is the WordPress documentation, but it's a little beyond my abilities:
What lines would I need to add to the php in Omeka and where?
Thank you so much!
A brute force approach would be to do this directly in the theme, using the
snippet() function for whichever field, using a GET variable to decide whether to show the long text or not, and writing in a "read more" with a link that includes that GET variable.
On the other hand, something that would work across themes would be nice, and could probably be done with a plugin that uses the Element Display filter.
I whipped up a bare-bones plugin using the Element Display filter here: ReadMore
ReadMorePlugin.php, you can change the snippet length (currently 200 characters). It'll only support one metadata field (Dublin Core Description), but that can be changed in the
Hope that helps!
Wow, thank you so much, this is amazing!! I certainly would have gone the brute force route myself.
Do I just save the php file under the plugins folder on my site to test it out? (Sorry, unsure of the file path I would save it under.) Can't wait to see how it works!
It's a plugin, so you'll want to download the entire zip file from the bottom right sidebar. Instead of
ReadMore-master, rename the unzipped folder to just
ReadMore and put it in your plugins directory alongside SimplePages etc.
Then, you should be able to install it from the admin plugins page. Long descriptions should then appear with the "read more" link.
Thank you so much! I uploaded it, only to realize that I can't use it yet because I haven't upgraded to Omeka 2.0 yet (was saving that task for winter break). I'm really sorry about that, and will look forward to using it as soon as I've upgraded.
In the meantime, do you think I could use the brute force solution?
The php is still a little beyond me. Looking in the forums, would I do something like this?
<?php echo snippet(exhibit('Description'), 0, 300); ?>
I'm not sure which php file in the theme I would add this line to, or how to add the "read more" tag.
Thanks again for all the help, and sorry I couldn't use the plug-in straightaway. It was really kind of you to write it.
I'm so sorry to ask again after all the time you put into making a plugin, but I'm looking for a little guidance on a brute force solution for a continue reading tag for the description field. My php skills are still such that I would need to know exactly what to write in which file.
I wouldn't bother you all again, except that this is in response to a peer review comment, and I'm hoping to resubmit the revised site soon.
Thanks for all your help and patience, and I will look forward to using the plugin as soon as I upgrade over winter break!
This would be terrific to have.
I tried the plugin, but unfortunately it's not working. The description text is shorted up to the 200 character limit and a the 'Read more' link appears, but clicking on the link only refreshes the page without the extended text.
I'm sure loads of folks would love to use this plugin.
I haven't been able to reproduce the problem. Is there a public site where I could see the problem directly?
Sorry to have not responded sooner. You can see an example here:
If you get a chance to look that will be great.
That looks like my bad. I have it listed as working with 2.0, but it actually only works in 2.1.
I'll dig around to see if I can redo it so it works in 2.0
rfranks1 I put up a new version of ReadMore that should work with 2.0.
Awesome! Works perfect - thanks loads!