I am using Umbraco 7.5.8. I would like for a page to switch to another template if the browser being used is certain versions of internet explorer. I wasn't sure how to do this or if it could be done.
It seems that adding the altTemplate parameter to the URL, e.g:
my-domain.com/my-page?altTemplate=newTemplateName
works right out of the box (just make sure to add the new template to the document type's "Allowed Templates" in Umbraco). Combined with Mario's suggestion to use JavaScript, this should do it.
Related
I am having serious problems customizing my views template to displayblog entries in drupal 7.
please anyone with knowledge of what can help me please reply. i have gone through a couple of drupal documentations but no luck. my field.tpl.php seem to be the only template that actually affect my displays even though i have views-view-field.tpl.php, views-view--blog.tpl.php in the template .
In the view settings, under format, show, make sure you have fields selected, not content.
Under advanced, theme, click information to see which template files are being used, and click rescan if necessary.
If you have created or edited a view, please check under FORMAT section this should be Show:Fields and under Advanced section look for Theme:Information and click onto this, there will be a popup with all possible templates for the display plugin and for the style plugins. All field tpl will be available here those are exists in views fields, you can find your own and use as per your requirement.
When you edit your view open "Advanced" section on the right (collapsed by default) and click on "Information" from "Theme: Information" (last option in that section). There you can see what templates are used (bolded ones) and what could be used instead. You can even click on template description at the beginning of the line, and code will be displayed. Grab that code (copy) and create new template file with one of offered names. Place that template file in your theme and clear the cache. Now you can modify template by your needs.
Also, you even don't have to use all that hierarchy (even that's desirable), but you can i.e. find the template file that are looping over the rows and inside that loop put your html, so lower rank templates won't be included (i.e. template that iterates over fields or even over rows) . Again not so clear solution, but it works for me. I prefer having less template files and I know that nobody will work on that theme except me.
I use Umbraco 7.2.1
I have a document type called News with allowed 2 different templates: News (default) & Projects
I create a page and choose Project template for it. And it displays News template instead.
I tried the following to see what's wrong and came to nothing:
I set up a new page and choose Projects template - the page displays News template instead.
I changed the default template for this doc type to Projects and set up new page with different title - the new page still displays News template instead of default Projects.
It is not logical. Tried to refresh the cache but the problem persists.
I ensured the template is correct and it displays as such in the CMS as well.
I have another doc type which uses different templates and have no problem with that. Only with News/ Projects templates.
Completely not logical..
You will need to check the structure on the doc type to check if both templates have been allowed to the News doc type. Typically when you create a new document type, only one template will be assigned. Alternatively, go to content, click on the properties tab and down the bottom you will see template. You should have dropdown enabling you to select which template you would like to use.
This is an odd one to me because it only started happening since we moved to Apex 4.2. To get round the problem i have to copy and paste regions I already have in the application, rather than simply creating a new one.
When i create a new application and try to create a region on a page the attached always occurs. This also occurs if i create a new page in a current applications that were already in place before the Apex 4.2 upgrade. Was it even to do with the upgrade?
I assume its something in the Templates or Themes under Shared Componants but i cannot see anything that sticks out.
I thought i would try an HTML5 template to see if that made any difference however the same occurs, see screenprint.
Is there an answer why this is happening and how it could be resolved?
This really looks like it is a template "issue". You need to check your page template: what is it named?
For example, in Theme 23 there are several page templates which include a left, right or both sidebars. When your page uses a template with this sidebar, then the sidebar will always use up a portion of the screen.
If you have no template specified but rather use the "Application Default", then go to "Shared Components > Templates" and look at the page templates section for the template which has a check in the "Default" column. Most likely it is a template including a sidebar.
Aside from that you could also always use a tool to inspect the HTML and CSS. For example, with Firebug in Firefox you could rightclick on the empty space left of your region and choose "inspect element with firebug". It might be a TD element. It might be a div with a fixed width. It might be custom css pushing things about.
I need to make some parts in template show or hide based on what page i'm on. I know I can make multiple themes in liferay-look-and-feel.xml file and give settings but this creates multiple themes in admin.
Is there some other way like accessing info about what portlets are on this page. Lets say if it has log in portlet then don't show navigation links for example?
I think the simple way is to add this function over javascript. With javascript you can e.g. observe existing of login-portlet-id and then hide the navigation.
In liferay template, a velocity variable is available called the $processor. It is nothing but object of
com.liferay.portlet.layoutconfiguration.util.velocity.TemplateProcessor
The portletId is available in this object, but there is no direct method to get it. Please have a look at:
TemplateProcessor.java.html
Once you get the portletId, then you can write the logic to hide certain sections.
I have a problem that has a simple fix I am sure. I set my default template in joomla, but when I set the other menu items to use a different template, it still uses the default value instead.
Any help would be great
Thanks
To start answering your question is important to know wich version of Joomla you are using. And also, how are you changing those values.
Anyway if you go to templates configuration under extensions, and enter to a specific template you can change and asign template to specific menu items, the same way you display modules only on certain pages.
Regards