Comments (10)
I also wonder if it's possible to remove the "News" viewbag title from the home page
You can change it or even completely remove it. To do the latter:
Open App/Modules/News/Http/Controllers/NewsController
. Find the showOverview
method and this (around line 54):
$this->title('no-title');
Then open <cms-folder>/contentify/HtmlBuilder.php
. Find the title
method (around line 66). At its beginning add this:
if ($title == 'no-title') return '<title>'.Config::get('app.title').'</title>';
So it should look like this:
public function title($title = null)
{
if ($title == 'no-title') return '<title>'.Config::get('app.title').'</title>';
if ($title) {
$title .= ' - '.Config::get('app.title');
} else {
$title = Config::get('app.title');
}
return '<title>'.$title.'</title>';
}
from contentify.
I noticed my website doesn't have a proper description in search engines
Some pages of your website should have an OpenGraph description. But yes, not the good old <meta name="description" content="whatever">
description.
I expect I have to add this to all the main view pages in app/modules from each page?
Assumed that your code works: yes. I understand that you want to have individual descriptions for particular pages. Then ofcourse you have to implement this for all of these pages.
from contentify.
Thank you!
from contentify.
I noticed the App/Modules/News/Http/Controllers/NewsController notitle change, changes the viewbag title from http://localhost/newsid/newstitle. I wonder if it's possible to remove the News - Website Name to Website Name instead when going to http://localhost/ (just for this index page)
from contentify.
I am 100% sure if I understand what your plan is - but try this:
Open App/Modules/News/Http/Controllers/NewsController
. Find the index
method (line 16). Add this code at the beginning or the end of the method (I am not sure if it matters so if it does not work in the first place try it the other way):
$this->title('no-title');
from contentify.
Thank you so far! It seems to remove the viewbag title from /news but not from the 'root ' index domain, I have been looking but not sure where it loads this page from
from contentify.
Now I am confused. I guess I missunderstood something but I do not know what.
Did you add this
$this->title('no-title');
to both, the index
and the showOverview
method?
from contentify.
Yes, that removes the 'News -' from http://www.website.com/news page, and when placing the no-notitle in showoverview it removes the title from http://www.website.com/news/newsid/titleslug. What I would like to achieve is remove the 'News-' from the http://www.website.com/ page. All the changes that i've done to the NewsController so far haven't been able to achieve this yet. Hope you understand me now cause it's hard to explain :)
from contentify.
No offense but I am quite sure that you did not follow my instructions in the right way. 😛
This is how your app/Modules/News/Http/NewsController.php
should look like (or at least very similar):
http://pastebin.com/XPmn2i2d
Line 54 is the important line. It's inside the showOverview()
method. This method is called when you navigate to your website without navigating to a particular page. Example: http://demo.contentify.org/
So there is no way that this behaviour occurs:
I noticed the App/Modules/News/Http/Controllers/NewsController notitle change, changes the viewbag title from http://localhost/newsid/newstitle
If this happens then I assume you made the wrong change to the code. So compare your NewsController.php
to the one I've posted above.
from contentify.
I did indeed make a mistake I was adding it in the show() method instead of the showOverview(). It is working properly now, Thank you!
from contentify.
Related Issues (20)
- Defaulting own Theme! HOT 1
- News not being updated HOT 1
- V3 Installation Error
- An error occurs when adding an avatar to a profile or any image HOT 2
- Cant Open News. Error HOT 1
- Dificult to join a cup team HOT 1
- Nightmare to install v3.0 HOT 8
- Installation error: File(/storage/app/.installed HOT 2
- install.php Launch Installer button sends to a 404 Not Found Page HOT 3
- PHP 8.0 word Match installation issues with Contentify ver. 3.1 (unexpted token "::"...) HOT 5
- Problem Useranzeige HOT 2
- Team Banner kann nicht hochgeladen werden HOT 18
- Upload multiple images to the gallery HOT 3
- reCAPTCHA v3 help HOT 3
- 3.0 install issue HOT 7
- Can't install the 3.1 beta version HOT 3
- Error: Could not retrieve the theme name from the config! HOT 2
- Contentify Dead? HOT 6
- hey its omar from gesn WHY CANT I GET THIS RUNNING ON DOCKER
- syntax error, unexpected token "::", expecting "(" (View: HOT 1
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 contentify.