I am working on a phpbb design. I have a local install with a duplicated database of the original site. I have no access to the administration panel since I am not an admin on the original site.
Changes made to the CSS would not show on the page, so I edited the file /style.php and forced recompiling CSS by setting $recompile to true. That solved the issue.
However, I am now trying to make changes to the HTML, because the phpbb semantics is one of the worst I have ever seen, and most elements don't have classnames.
When making changes to template files (let's say to the "prosilver" default theme), those changes won't show on the page. For example if I add classnames to certain elements, those classnames will not appear on the page.
I know that the problem comes from phpbb caching templates, and I tried forcing recaching by setting $recache to true in /style.php, but that didn't work.
Thanks for any help !
Kind regards.
If you have access to the server via ftp or your hosts control panel, go into the /cache directory and delete everything EXCEPT .htaccess and index.htm. This will have the same effect as clearing the cache via the ACP and will force the templates to recompile.
Related
I'm migrating my website to another hosting, but I have problem with the font.
When you open site for the first time font is not working, it's just showing blank squares, after you go into any subpage it starts to works. Do you have any idea what might be causing it?
its depends on where you added font awesome in opencart.
Mostly it should be in
catalog/view/theme/default/template/common/header.tpl
And if you added with some custom condition then check it.
because in opencart only Except then home page, other inner pages open with Query parameter.
ex. index.php?route=common/home
So, for inner pages check source code and look at the CSS path is proper or not.
Just to add (I cannot comment), if you're not using the default theme, you'd want to navigate to catalog/view/theme/(your theme name)/template/common/header.tpl
If you're using the Journal theme, you'll want to check the template/journal2/headers folder.
Try these and tell us if any of them makes a difference:
Edit your config.php and check that the HTTP_SERVER and HTTPS_SERVER variables are correct.
Make sure that the link to Font Awesome is correct, this also means making sure that if your site mainly uses www.domain.com and not domain.com that your link to Font Awesome has www. in as well. Same goes for http:// vs https:// and vice versa.
Check the casing of the font filename. Font-Awesome.min.css is not the same as font-awesome.min.css and your new server may care about that.
Koda
In the Aurelia SPA template it assumes that every page will be inside app.html and use the same nav-bar at the top. But I'll have many pages that don't want the nav-bar at the top and actually not use app.html at all. I was looking at main.js and it looks like I could hook into bootstrap() and change the aurelia.setRoot() for certain pages (I'm just guessing here), but then I start mucking up the main.js file and it won't be long before it gets really messy and maintenance headache. I really just want to have some pages use their own format altogether and ignore the app.html formatting without doing any crazy configurations.
My initial thought is maybe app.html should just be an empty file and make every page decide whether or not it wants the nav-bar and include it on the individual pages. But now I'm duplicating the code across many pages and if the standard page layout changes I have to change all the individual pages. Not sure the best way to go about his. Any suggestions?
I actually disagree with Gilbert's answer. Using .setRoot is a best practice; the root is just the parent view/viewModel pair and you will often have different parents. This is essentially what you're doing when you're creating an empty app view/viewModel, creating a new parent that doesn't do anything. But adding an unnecessary, unused layer is just extra complication.
One of the best use cases for this is a login page. The login page is totally different from your normal app page--there's a login prompt, no navigation bar, etc. Therefore, make a "login" app root and a "app" app root and switch back and forth between them. I've built a template called Sentry that demonstrates how to do this.
Sentry in action
Sentry on GitHub
Using set root, like you said, is a bad idea. Similar to what you said, you can make app.html contain just the router view tag. Different parts of your app, that you want to share a similar page layout, will be gruped under different routes. Now each of theses routes will point to another router that will have its different styles in the view
Just think of it as an empty app.html with child app.html's that have styles in them(e.g. Different navbars, page layout etc)
this is my local site: drupaltest1/
When I/anyother developer inspect my site they can recognize which theme I am using. I want to hide the theme being displayed on inspect elements an display the site name in the path. I searched google, but no luck. Anyone please help in achieving this.
Thanks in advance
You could change the name of the theme to your sitename.
in sites/all/themes/ copy your theme folder and rename the folder
then replace the theme name in .info file and use find/replace in template.php and any other theme specific files as well. (notepad++ search in files works well)
upload and enable the new theme in Drupal
If you are not using a custom theme for your site, be sure to check the licensing/copyright to ensure renaming it isn't a violation - and updates may have issues so you could remove the project info and/or packing script info.
If you can create a sub-theme, then you would be able to hide those info(s) from being inspected your site pages.
Please reply if this helped you.
https://www.drupal.org/node/1010576
https://www.drupal.org/node/225125
I am using Joomlart.com's JA_ORISITE template for my site, Everything works perfect except the css, It might be a feature of the template to maintains its original design, but This feature is a big hurdle for me. I have changed the css of the template as per my requirements, but every time I load or install a new module or plugin in to my installation, Default css is being loaded automatically, so Every time I need to fix the css as per my requirements and this frustrates me....
Glad to see any possible solution.... :)
T3 framework uses LESS to compile the CSS being used by the template. LESS is recompile for a multitude of reasons and it sounds like installing a new extension is one of them. When LESS is recompiled, you will lose any edits you have made to the CSS.
In order to made CSS edits that are not overwritten by LESS you have to put any custom CSS in custom.css. The template is configured not to touch that file so your changes are not lost.
Documentation is here - http://t3-framework.org/documentation/customization.html#custom-css
What file did you edit to make your customizations? I'm guessing you edited one of the included CSS files in the template. Your best bet is to make a new custom.css file and add that to the css being loading in index.php.
How can I include a page from magnolia into a magnolia template script?
In the template script with I can access data from a specific page, but how can I load that page into the template?
Let's say I have 2 pages each with its own template. Page 1 contains in its tree page 2. I want to include in the template script of page 1, page 2, but doesn't work.
Thank you very much :)
UPDATED
What I actually want to do is include my header in all of my project's pages. But I don't want to put it as a paragraph, because if I ever want to change my header, I'll have to edit all the project's pages.
So what I try to do and I don't know if this is the correct approach is to create a page template for the header. This template won't include any , or css, it's just the code for the header.
The next thing I want to do is create a page in magnolia with that model to be the header.
Next I'd like to include the page I've just created in my main template model for the project, but I can't figure how to do that.
I am new to Magnolia cms and initially I tried creating my demo site using stk. The only problem was that I couldn't use jsp as a scripting language, or at least I couldn't find any solution on the internet. I don't really know freemarker, but that's not really a big problem. I'm really reluctant in using freemarker because maybe in the future in a more complex project I might need some features that freemarker doesn't support, but jsp does. I'd like to build my site using jsp if that's possible with magnolia.
I'm sorry for this long update, but if anyone has any suggestions on what a best practice could be and if I could implement what I want in jsp I would be really grateful.
Thanks again for you time :)
If you're using the STK then see this guide on content-reuse.
If not have a look at the cms tag-lib, especially the tags cms:loadPage and cms:setNode with which you can get a piece of content and set it as a JSP/JSTL variable and then render it using cms:includeTemplate.
A common scenario is to 'inherit' content from the parent page, the header is an excellent example of this. What you do is for an area you walk up the content hierarchy and render everything from the parent pages in their area with the same name. This way the header which you've only added to the top page is included in all its children.
Another option is to a have special page which simply holds things to be included in other pages. Like header, footer and banners that should go in the side pane of some pages.
Including a page within another page doesn't really work. Page 2 already has its own <html> tags, its own <script> tags, and its own CSS, so including it wholesale into another page just simply doesn't make sense.
You do, however, have a couple of options:
Use an iframe. This will allow you to include the entirety of Page 2 in a region of Page 1.
More recent versions of Magnolia will allow you to render an individual paragraph, which you could then include in another page. (For example, you can see a single paragraph from http://demopublic.magnolia-cms.com/demo-project/about/subsection-articles.html at http://demopublic.magnolia-cms.com/demo-project/about/subsection-articles/article/main/0.html.) This requires knowing a bit about the way the data is structured, but is a pretty useful way to be able to selectively extracts bits of a page.
You can use the Magnolia API in your model class to pull data from sub-pages, and then make it available to your view template. This is the approach the STK uses to build teasers that include content from the pages they reference, and is probably the most powerful and flexible approach, but it does require actually writing some Java code. (See http://documentation.magnolia-cms.com/templating/stk/templating.html and http://documentation.magnolia-cms.com/reference/templating.html for details of how to use this approach.)
(Added after question was edited) The footer functionality that's included with the STK does almost exactly this. You might be interested to take a look at that and see how it's implemented there.
Hope that helps a bit!