Comments (5)
I was unable to reproduce this issue on my local installation.
I've created a faqs
content-type and then created theme_node_faqs.ctp
and all seems to be okay.
- What is the ID of your content_type ?
- And the name of your .ctp file?
from cms.
First, a my mistake: I thought that in this way I could override also the LIST of a specific node type, not just the node redering.
So the "false" result was on listing that content (/s/type:example _ type
...there is no spaces betweend underscore char ...but otherwise the editor remove it)
Anyway, showing the specific content I have a problem too.
Strange, the file_exists($tp . 'Elements' . DS . 'theme_node_' . $nodeType . '.ctp')
return false, but I put the file in the same folder of theme_node.ctp
and its name is theme_node_example_type.ctp
.
I tried this line:
debug(file_exists($tp . 'Elements' . DS . 'theme_node_node.ctp'));
and it is false too... (but I have that file and it works)
from cms.
Exactly, the node theming feature is for the "FULL" view mode only (node's detail page)
Well the result of ´file_exists()´ is very clear. Check that your .ctp file is located where it should:
debug($tp . 'Elements' . DS . 'theme_node_' . $nodeType . '.ctp');
Instead checking the return of the function, make sure that the argument (file path) is correct and exists in your computer,
It should be:
/absolute_path/to/your_active_theme/Elements/theme_node_example_type.ctp
from cms.
After thinking a bit, I think thi is incorrect:
"Exactly, the node theming feature is for the "FULL" view mode only (node's detail page)"
This ferature should simply acts as an alternative theme_node.ctp
file. So it should work for any view mode, just as you were thinking at the begining.
I've removed the $this->is('view.node')
part, because the same .ctp file may be used for any view mode. Similar as theme_node.ctp
works:
from cms.
Great!
It think it's correct behavior too!
My mistake for the file ...I was trying on another installation with the same Theme...
from cms.
Related Issues (20)
- Call to undefined function Search\Engine\Generic\iconv() HOT 3
- Image upload no longer working HOT 4
- Call to function isAdmin() on null in .../cms/config/functions.php on line 410 HOT 5
- facing error 500 while installation HOT 5
- An Internal Error Has Occurred. (Behavior class TreeBehavior could not be found.) HOT 9
- Error 404 - Record not found in table "roles" HOT 5
- Stored Cross-Site Scripting (XSS)
- Fatal error: [BadMethodCallException] Method getParam does not exist HOT 3
- Error 500 after finished installing HOT 12
- Do you need Filipino Translation for your CMS? HOT 4
- CSRF issue that allows attacker to create an account HOT 2
- ListField error! HOT 5
- _urlMatch Region Block module HOT 3
- PDOException Field 'public_profile' doesn't have a default value HOT 8
- EntitiesTerms Table
- The eav_attributes table HOT 1
- CSRF issue that allows attacker to change the administrator password HOT 1
- Command Excution can allowed attacker excute command
- Command Excution can allowed attacker excute remote command HOT 1
- [File upload vulnerability] CVE-2019-19576 is exist in the code!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cms.