rialni Posted August 24, 2014 Share Posted August 24, 2014 Hi, In the mobile version of the site, I've managed to remove most of the links that I didn't want but there's one thing I just can't figure out. In the list of CMS pages, it's not all of them I want to show up, since 2-3 of them look awful on the mobile, so they should only be available in the web version. Some of them I still want though, so I can't just remove the link to CMS pages. Does anyone know how to do this type of sorting? site is philippejse(dot)dk Link to comment Share on other sites More sharing options...
rialni Posted August 26, 2014 Author Share Posted August 26, 2014 No one has any idea how to proceed? Link to comment Share on other sites More sharing options...
Krystian Podemski Posted August 26, 2014 Share Posted August 26, 2014 Hi, From which place you want to delete these links? From the footer? The CMS category listing pages? 1 Link to comment Share on other sites More sharing options...
rialni Posted August 26, 2014 Author Share Posted August 26, 2014 Hi Krystian, In the mobile site version there's no footer link etc. If you take a look at the site (philippejse(dot)dk) and change to mobile view, it's the menu point called 'Nyttig Information', third from bottom. When you click on that, you get to the full list of CMS pages on the site. Since two of these look awful, I wish to take them out, but keep the ones that are important, like "åbningstider" (opening hours). The ones I wish to take out are the ones called: "Kataloger" and "Nyheder" - if I can't take them out I just need to find a way to make them look okay, as it's currently a mess to look at Thanks for looking at this with me Link to comment Share on other sites More sharing options...
rialni Posted August 26, 2014 Author Share Posted August 26, 2014 Also, if you know where I can find the CSS code to change the blue background of the header of that 'CMS-page' to orange, it would be much appreciated. Thanks Link to comment Share on other sites More sharing options...
vekia Posted August 26, 2014 Share Posted August 26, 2014 themes/default/mobile/categry-cms-tree-branch.tpl there is a code like: {if isset($node.cms) && $node.cms|@count > 0} {foreach from=$node.cms item=cms name=cmsTreeBranch} <li><a href="{$cms.link|escape:'htmlall':'UTF-8'}" title="{$cms.meta_title|escape:'htmlall':'UTF-8'}" data-ajax="false">{$cms.meta_title|escape:'htmlall':'UTF-8'}</a></li> {/foreach} {/if} replace code: <li><a href="{$cms.link|escape:'htmlall':'UTF-8'}" title="{$cms.meta_title|escape:'htmlall':'UTF-8'}" data-ajax="false">{$cms.meta_title|escape:'htmlall':'UTF-8'}</a></li> with: {if $cms.id!=9 || $cms.id!=4}<li><a href="{$cms.link|escape:'htmlall':'UTF-8'}" title="{$cms.meta_title|escape:'htmlall':'UTF-8'}" data-ajax="false">{$cms.meta_title|escape:'htmlall':'UTF-8'}</a></li>{/if} 1 Link to comment Share on other sites More sharing options...
rialni Posted August 27, 2014 Author Share Posted August 27, 2014 Thank you Vekia, but unfortunately it didn't do the trick. The list is still the same and when I do an F5 update, it says the page can't be shown. Here's my new code in category_cms_tree_branch.tpl: {if isset($node.cms) && $node.cms|@count > 0} {foreach from=$node.cms item=cms name=cmsTreeBranch} {if $cms.id!=9 || $cms.id!=4}<li><a href="{$cms.link|escape:'htmlall':'UTF-8'}" title="{$cms.meta_title|escape:'htmlall':'UTF-8'}" data-ajax="false">{$cms.meta_title|escape:'htmlall':'UTF-8'}</a></li>{/if} Link to comment Share on other sites More sharing options...
Krystian Podemski Posted August 27, 2014 Share Posted August 27, 2014 (edited) The best way to do things like that is adding dynamic class to <li>, in this way: {if isset($node.cms) && $node.cms|@count > 0} {foreach from=$node.cms item=cms name=cmsTreeBranch} <li class="cms_page_{$cms.id_cms}"><a href="{$cms.link|escape:'htmlall':'UTF-8'}" title="{$cms.meta_title|escape:'htmlall':'UTF-8'}" data-ajax="false">{$cms.meta_title|escape:'htmlall':'UTF-8'}</a></li> {/foreach} {/if} Now you can hide your pages in CSS by adding for example: .cms_page_20, .cms_page_9 { display: none; } I think that vekia solution should also works but you need to use id_cms instead of id in loop. Edited August 27, 2014 by Krystian Podemski (see edit history) 1 Link to comment Share on other sites More sharing options...
rialni Posted August 27, 2014 Author Share Posted August 27, 2014 Thanks Krystian. I tried your solution also, but again with no luck. I don't understand what I'm doing wrong here I replaced with the code you gave and hid the CMS-pages in question in global.css (mobile) like you suggested and then tried jpm-docs.css but none of the two work. I'm starting to pull out my own hair Link to comment Share on other sites More sharing options...
rialni Posted August 28, 2014 Author Share Posted August 28, 2014 Any other ideas? Why won't this work Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now