Modifying dspace discover page in xmlui mirage theme - css

I'm trying to modify the Mirage theme in DSpace 4.2 to cater to the specific needs of my organization. We want to add our own search box with custom search fields, and modify the search results page.
This is how the default dspace search results page looks like:
After tinkering around with the css and xsl I came up with this layout:
The top search panel was added by me by modifying the page-structure.xsl file. Now, I want to remove the default search box which appears in the results page. I've looked into all the css, xsl and sitemap files.
By inspecting the sitemap files I found that the search is carried out by calling the [dspace-source]/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/discovery/SimpleSearch.java file.
I commented the code sections where the search box was being added, and re-built and re-deployed dspace, but still no success.
Maybe, I'm not looking at the right files, due to lack of understanding.
It would be nice if someone points me in the right direction.
Thanks in advance

You can override the template that generates the search box. In [dspace]/webapps/xmlui/themes/Mirage/Mirage.xsl put this after the <xsl:output indent="yes"/> line:
<xsl:template match="dri:div[#id='aspect.discovery.SimpleSearch.div.discovery-search-box']">
<!-- You can also add content here
to replace the default search box
-->
</xsl:template>

You seem to be on the right path. If you indeed commented out lines after 131, you should see the effect that the box is removed.
So if you are not seeing the change, it's possible that there is something wrong with how you deploy these updates. Can you confirm that you have performed a mvn clean package and ant update before restarting your tomcat?

Related

Mageno module idea

I'm working on Magento modules.
After few guides I managed to create module that says "hellow world".
Also I have made some of css code that add simple image border around whole page.
So the problem is: how to combine them together?
I want that when I install my module, image border appears around page.
What should I be looking for? Any tips? I need right path to look for answers
T.y.
You need to to
Create a module
That modifies the global layout such that your CSS is added to the page
Re: number two, there's multiple ways to go about doing this. These days I favor the event/observer method
Add an observer for the controller_action_layout_generate_blocks_after event
Fetch the head block from the layout in your observer method
If you find a head block, add your CSS file to it programtically
The more traditional way is
Configure you module to include an additional layout update XML file
In the default handle of your new layout update XML file, add XML that tells Magento to add your CSS file
That should give you enough to google on and come back with more specific questions. Good luck!

How do I remove "Shop By" in the left-hand-column?

When viewing a list of products in categories I have a "Shop By" filter in the left-hand-column of my store front end. This allows users to view products in specified price ranges.
Try as I might I can't find a way to disable / remove it from view. I've read various code hacks for previous versions of Magento which claim to work (they didn't for me) - but (a) I don't like the idea of hacking core code and (b) all the tips I've seen pre-date v1.8.1.
Is there something I can use in CSS to cleanly disable the "Shop By" feature? (thinking along the lines of a display:none) Failing that any code modification (as minimal as possible....) would be gratefully received.
Real shame there doesn't seem to be an option in admin to switch this off. Unless I've missed it?....
Thanks,
Edit the catalog.xml of your theme (if your theme does not have that file, just copy it from base/default) and remove any trace of this text
<block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
The easiest way I found in Magento 2 was to modify /magento/app/design/frontend/<Vendor>/<theme_name>/Magento_Theme/layout/default.xml to remove the block.
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="catalog.leftnav" remove="true"/>
</body>
</page>
Clear your cache with php bin/magento cache:flush, and you those "Shop By" options should now be gone.

Django CMS Deleting HTML5 Tags and Attributes

I am having a big time issue with solving a problem. I have a placeholder called main for the content region of the page. I was building that region in the cms. Everything was going great until I attempted to add an embedded video contained in an iframe. When I save django cms completely removed the iframe and left an empty div. So I attempted to use prettyphoto light box to open the video by clicking on an image. The code I added to the page through the cms is:
<a rel='prettyPhoto[youtube]' href="https://www.youtube.com/embed/mqVZF_yb8C0?autoplay=1&start=1765&iframe=true" data-rel="prettyPhoto">Click Image</a>
When I saved, django cms completely removed the data-rel attribute from the link which is obviously needed for the js. So I went a step further and adapted the code of the data attribute to:
rel="prettyPhoto"
and the cms also removed that attribute! Also anytime I add an html5 tag like article of section it hates that too! What gives here? Am I doing something wrong? Any advice would be appreciated. 
Aaron,
Thanks.
Please see the discussion at https://github.com/divio/django-cms/issues/1529. We use html5lib to clean the contents of the text plugin (this cannot be turned off for security reasons).
What you'll want to do is write a custom plugin (possibly one that can be embedded inside text plugins).

Image on the first line disappear in wordpress posts, but DOES NOT disappear from second line onward

I am developing a wordpress theme based on Roots starter theme . However, I am facing a problem here. When I insert an image on the first line it does not appear, not even in the html mark-up (I checked page source to ensure that). However, when I insert the image from second line onward it shows up properly (also reflected in html mark-up as checked from page source).
I was wondering if that could be an issue with my theme or wordpress itself. I am using version 3.5.1 in the development environment.
Would highly appreciate any discussion on this.
Well you can try to insert the image manually from the begining in HTML code.Find the path of the image that you want to insert and put it on
<img src="" />
Most probably this issue lies with your theme. Try checking your functions.php file and see if there a filter which is related to JavaScript or the_content.

seam-gen and flex

I have integrated seam and flex with FlamingoDS
I got html file from mxml file and I stored it in WebContent folder it's fine
then I want to create link named as 'Plan' in menu.xhtml
My aim is to get that html file when i clicked on this button I don't know what to do for that
so, I have created some test.xhtml in that top element is the
for the template attribute this element I have given the template.html
and I used
then for 'Plan' link I gave the view="/test.xhtml"
It's fine when I clicked on that link I am getting the test.seam file which includes our html file but this html file is coming in some fixed area with scroll bars only eventhough there is a lot of space to fit
Please help...... me
First of all, it is very difficult to read your post. Please format it more readable.
Secondly, we can only guess what's wrong when we cannot see any code. But my hunch is that you are using s:decorate that includes some formating you are not aware of. This comes in standard seam-gen. Try removing that s:decorate stuff or point to another style you wish to use.

Resources