I need help.
I want to know how to work with partial. I have created some buttons in partial and then rendered that partial on a different page. so when this partial is rendered, all the buttons come with it but I don't need all the buttons on every page. So how to hide and show those buttons that I need. Please give an example.
Related
Hello!
How to display partial only on a page and its subpages? How to build a condition correctly?
how to display the menu on "about company" and its subpages
.../about-company
.../about-company/history
.../about-company/something-else
I know what can be done to the condition for one page
if this.page.id
and how to do for all subsequent subpages –
You would typically do this using layouts like Pettis Brandon suggested in the comments.
You seem to be under the impression that this would require duplicate code. It does not. You would place any duplicate code (code that remains the same in multiple Layouts) in partials. Different Layouts would simply include the same partials.
Can someone explain a situation where using a modal is a better choice than generating a new page? Both of the concepts seem to be the same. New controller, new view etc.
I'm Going to reference their documentation that clearly explain the difference.
Modals Modals slide in off screen to display a temporary UI, often used for login or signup pages, message composition, and option.A Modal is a content pane that goes over the user's current page. Usually it is used for making a choice or editing an item
selection.
And Pages are to Display content that require complex logic or have a single purpose
This could be a more UX question ? you can get a answer here
I need to add a rendering to all the pages. I thought adding to a Page Basic template that I have and is being inherited for all the page templates.
These page templates have different renderings and layout so the presentation is overridden. On top of that, authors have been adding more renderings to the pages themselves.
Any ideas on how to add this rendering to all the pages?
Thanks
I would use sitecore Powershell to accomplish this. After traversing the tree you could add the rendering using the code in this link.
Just make sure to backup you db, just in case!
https://blogs.perficient.com/microsoft/2016/06/sitecore-powershell-add-rendering-to-item/
I'm working on a events board app. Events are displayed in columns at the height matching the start time and pack into the space if there is more then one overlapping. Each event is a view and I want to have a div next to the view that shows and hides on hover.
I know how to bind to mouseEnter and mouseLeave to show and hide part of the template but I want to show something adjacent to my view/template not within it.
I've already got some computed properties on the view to place the event with the correct height and width so I don't want to add the popover inside the view.
Here is something to mess with http://jsbin.com/osoner/1/edit
Seems like something simple but I want to make sure I'm doing things the Ember way.
After messing a little with your provided jsbin, here the results.
Basically what I've done was adding a new popup css declaration wich do position the popup so that it appears outside the parent view, and also moved the {{#if...}} helper into the originating view.
If you want to go more fancy, checkout this jsfiddle wich uses the twitter boostrap popover.
Hope it helps.
I have a list of links within a div with a scrollbar. When the user clicks on a link below the x-height of the div, the srollbar automatically goes back to the top. I would like the scrollbar to stay in position no matter what links the user clicks. Here is the site- try clicking on a painting from 2006 and you'll see what I mean.
Does anyone have any ideas of how I can make this scrollbar behave?
Thanks,
Brad
It looks like these links are just that, links to a new page... and thus it's not so much that the scrollbar is resetting but that a whole brand new page is coming up and the 'reset' scrollbar is just a byproduct.
The most elegant way would be to have those links pull in the new content without reloading the page, but this requires AJAX. If you aren't familiar with the intricacies of AJAX and how to implement that, then you could change the link to include an anchor to the link, like so:
http://siddharthparasnis.com/2006-01/#menu-item-377
The page would reload scrolled down to that item.